Python Library

We provide a Python library, which you can install by running:

pip install parcllabs

Once installed, you can use the library and your API key to run the following:

import os

from parcllabs import ParclLabsClient

api_key = os.getenv('PARCLLABS_API_KEY')
client = ParclLabsClient(api_key)

# get all metros and sort by total population
markets = client.search_markets.retrieve(
        location_type='CBSA',
        sort_by='TOTAL_POPULATION',
        sort_order='DESC',
        as_dataframe=True
    )
# top 10 metros based on population
top_market_parcl_ids = markets['parcl_id'].tolist()[0:10]

start_date = '2020-01-01'
end_date = '2024-04-01'

results_rental_units_concentration = client.rental_market_metrics_rental_units_concentration.retrieve_many(
    parcl_ids=top_market_parcl_ids,
    start_date=start_date,
    end_date=end_date,
    as_dataframe=True
)

results_gross_yield = client.rental_market_metrics_gross_yield.retrieve_many(
    parcl_ids=top_market_parcl_ids,
    start_date=start_date,
    end_date=end_date,
    as_dataframe=True
)

rentals_new_listings_rolling_counts = client.rental_market_metrics_new_listings_for_rent_rolling_counts.retrieve_many(
        parcl_ids=[2900187, 5374167],
        as_dataframe=True
)