
Parcl Labs Python SDK
We're on a mission to create the world's best API developer experience and community for housing data.
Our SDK is designed to supercharge your API experience and accelerate your time to insight. It enables you to efficiently pull the data you need, analyze it, and visualize your findings.
Table of Contents
Parcl Labs Data Overview
The Parcl Labs API provides instant insights into the U.S. housing market, delivering data on housing supply, sales, listings, rentals, investor activities, and market trends.
The most complete picture of US residential real estate
Property Types | 🏘️ All Residential Assets: ✅ Single Family ✅ Townhouses ✅ Condos ✅ Other |
Markets | 🇺🇸 Complete National Coverage, 70k+ Unique Markets at Any Level of Granularity: ✅ Regions ✅ States ✅ Metros ✅ Cities ✅ Counties ✅ Towns ✅ Zips ✅ Census Places |
Housing Events | 🔄 The Full Property Lifecycle: ✅ Sales ✅ For Sale Listings ✅ Rentals |
Cookbook
We maintain a repository of examples that demonstrate how to use the Parcl Labs API for analysis. You can find the examples in the Parcl Labs Cookbook
Getting Started
Step 1. Sign Up for an API Key
To use the Parcl Labs API, you need an API key. To get an API key, sign up at ParclLabs. In the subsequent examples, the API key is stored in the PARCLLABS_API_KEY
environment variable.
Step 2. Installation
You can install the package via pip:
pip install -U parcllabs
Step 3. Usage
The ParclLabsClient
class is the entry point to the Parcl Labs API. You can use the client to access methods that allow you to retrieve and analyze data from the Parcl Labs API. You'll need to pass in your API key when you create an instance of the ParclLabsClient
class.
import os
from parcllabs import ParclLabsClient
api_key = os.getenv('PARCL_LABS_API_KEY')
client = ParclLabsClient(api_key)
Num Workers
The num_workers
parameter is used to specify the number of workers to use for parallel requests. The default is None, which translates to min(32, (os.cpu_count() or 1) + 4)
. See docs for more details.
client = ParclLabsClient(api_key, num_workers=20)
Services
Search
Search is your entry point into finding one or many of over 70,000 markets in the United States. You can search for markets by name
, state
, region
, fips
, or zip code
. You can also search for markets by their unique parcl_id
.
Search Markets
markets = client.search.markets.retrieve(
location_type='CBSA',
sort_by='TOTAL_POPULATION',
sort_order='DESC',
limit=2
)
top_market_parcl_ids = markets['parcl_id'].tolist()
Rental Market Metrics
Gross Yield
Gets the percent gross yield for a specified parcl_id
. At the market level, identified by parcl_id
, gross yield is calculated by dividing the annual median rental income—derived from multiplying the monthly median new rental listing price by 12—by its median new listings for sale price.
Rental Units Concentration
Gets the number of rental units, total units, and percent rental unit concentration for a specified parcl_id
.
New Listings for Rent Rolling Counts
Gets weekly updated rolling counts of newly listed for rent properties, segmented into 7, 30, 60, and 90 day periods ending on a specified date, based on a given parcl_id
.
start_date = '2024-04-01'
end_date = '2024-04-01'
results_rental_units_concentration = client.rental_market_metrics.rental_units_concentration.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_gross_yield = client.rental_market_metrics.gross_yield.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
rentals_new_listings_rolling_counts = client.rental_market_metrics.new_listings_for_rent_rolling_counts.retrieve(
parcl_ids=top_market_parcl_ids
)
For Sale Market Metrics
New Listings Rolling Counts
Gets weekly updated rolling counts of newly listed for sale properties, segmented into 7, 30, 60, and 90 day periods ending on a specified date, based on a given parcl_id
.
For Sale Inventory
Gets the weekly updated current count of total inventory listed on market for sale, based on a specified parcl_id
. The data series for the for sale inventory begins on September 1, 2022 (2022-09-01).
For Sale Inventory Price Changes
Gets weekly updated metrics on the price behavior of current for sale inventory, based on a specified parcl_id
. Available metrics include the count of price changes, count of price drops, median days between price changes, median price change, and the percentage of inventory with price changes. The data series for the for sale inventory metrics begins on September 1, 2022 (2022-09-01).
start_date = '2024-04-01'
end_date = '2024-04-01'
property_type = 'single_family'
results_for_sale_new_listings = client.for_sale_market_metrics.new_listings_rolling_counts.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date,
property_type=property_type
)
for_sale_inventory = client.for_sale_market_metrics.for_sale_inventory.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
for_sale_inventory_price_changes = client.for_sale_market_metrics.for_sale_inventory_price_changes.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date,
)
Market Metrics
Housing Event Counts
Gets monthly counts of housing events, including sales, new sale listings, and new rental listings, based on a specified parcl_id
.
Housing Stock
Gets housing stock for a specified parcl_id
. Housing stock represents the total number of properties, broken out by single family homes, townhouses, and condos.
Housing Event Prices
Gets monthly statistics on prices for housing events, including sales, new for-sale listings, and new rental listings, based on a specified parcl_id
.
Housing Event Property Attributes
Gets monthly statistics on the physical attributes of properties involved in housing events, including sales, new for sale listings, and new rental listings, based on a specified parcl_id
.
All Cash
Gets monthly counts of all cash transactions and their percentage share of total sales, based on a specified parcl_id
.
start_date = '2024-01-01'
end_date = '2024-04-01'
results_housing_event_prices = client.market_metrics.housing_event_prices.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_housing_stock = client.market_metrics.housing_stock.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_housing_event_counts = client.market_metrics.housing_event_counts.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
housing_event_property_attributes = client.market_metrics.housing_event_property_attributes.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_all_cash = client.market_metrics.all_cash.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
New Construction Metrics
Housing Event Counts
Gets monthly counts of new construction housing events, including sales, new for sale listings, and new rental listings, based on a specified parcl_id
.
Housing Event Prices
Gets monthly median prices for new construction housing events, including sales, new for sale listings, and new rental listings, based on a specified parcl_id
.
start_date = '2024-01-01'
end_date = '2024-04-01'
results_new_construction_housing_event_prices = client.new_construction_metrics.housing_event_prices.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_new_construction_housing_event_counts = client.new_construction_metrics.housing_event_counts.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
Investor Metrics
Housing Event Counts
Gets monthly counts of investor housing events, including acquisitions, dispositions, new sale listings, and new rental listings, based on a specified parcl_id
.
Purchase to Sale Ratio
Gets the monthly investor purchase to sale ratio for a specified parcl_id
.
New Listings for Sale Rolling Counts
Gets weekly updated rolling counts of investor-owned properties newly listed for sale, and their corresponding percentage share of the total for-sale listings market. These metrics are segmented into 7, 30, 60, and 90-day periods ending on a specified date, based on a given parcl_id
Housing Stock Ownership
Gets counts of investor-owned properties and their corresponding percentage ownership share of the total housing stock, for a specified parcl_id
.
Housing Event Prices
Gets monthly median prices for investor housing events, including acquisitions, dispositions, new sale listings, and new rental listings, based on a specified parcl_id
.
start_date = '2024-01-01'
end_date = '2024-04-01'
results_housing_stock_ownership = client.investor_metrics.housing_stock_ownership.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_new_listings_for_sale_rolling_counts = client.investor_metrics.new_listings_for_sale_rolling_counts.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_purchase_to_sale_ratio = client.investor_metrics.purchase_to_sale_ratio.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results_housing_event_counts = client.investor_metrics.housing_event_counts.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date
)
results = client.investor_metrics.housing_event_prices.retrieve(
parcl_ids=top_market_parcl_ids,
start_date=start_date,
end_date=end_date,
)
Portfolio Metrics
Single Family Housing Event Counts
Gets monthly counts of investor-owned single family property housing events, segmented by portfolio size, for a specified parcl_id
. Housing events include acquisitions, dispositions, new for sale listings, and new rental listings.
Single Family Housing Stock Ownership
Gets counts of investor-owned single family properties and their corresponding percentage of the total single family housing stock, segmented by portfolio size, for a specified parcl_id
. The data series for portfolio metrics begins on March 1, 2024 (2024-03-01).
New Listings for Sale Rolling Counts
Gets counts of investor-owned single family properties and their corresponding percentage of the total single family housing stock, segmented by portfolio size, for a specified parcl_id
. The data series for portfolio metrics begins on April 15, 2024 (2024-04-15).
New Listings for Rent Rolling Counts
Gets weekly updated rolling counts of investor-owned single family properties newly listed for rent, segmented by portfolio size, and their corresponding percentage share of the total single family for rent listings market. These metrics are divided into 7, 30, 60, and 90 day periods ending on a specified date, based on a given parcl_id
. The data series for portfolio metrics begins on April 22, 2024 (2024-04-22).
results_housing_stock_ownership = client.portfolio_metrics.sf_housing_stock_ownership.retrieve(
parcl_ids=top_market_parcl_ids,
)
portfolio_metrics_new_listings = client.portfolio_metrics.sf_new_listings_for_sale_rolling_counts.retrieve(
parcl_ids=top_market_parcl_ids,
portfolio_size='PORTFOLIO_1000_PLUS',
)
results = client.portfolio_metrics.sf_housing_event_counts.retrieve(
parcl_ids=top_market_parcl_ids,
portfolio_size='PORTFOLIO_1000_PLUS'
)
results = client.portfolio_metrics.sf_new_listings_for_rent_rolling_counts.retrieve(
parcl_ids=top_market_parcl_ids,
portfolio_size='PORTFOLIO_1000_PLUS'
)
Price Feeds
The Parcl Labs Price Feed (PLPF) is a daily-updated, real-time indicator of residential real estate prices, measured by price per square foot, across select US markets.
The Price Feeds category allows you to access our daily-updated PLPF and derivative metrics, such as volatility.
Price Feed
Gets the daily price feed for a specified parcl_id
.
Price Feed Volatility
Gets the daily price feed volatility for a specified parcl_id
.
Rental Price Feed
Gets the daily updated Parcl Labs Rental Price Feed for a given parcl_id
.
pricefeed_markets = client.search.markets.retrieve(
sort_by='PARCL_EXCHANGE_MARKET',
sort_order='DESC',
limit=2
)
pricefeed_ids = pricefeed_markets['parcl_id'].tolist()
start_date = '2024-06-01'
end_date = '2024-06-05'
price_feeds = client.price_feed.price_feed.retrieve(
parcl_ids=pricefeed_ids,
start_date=start_date,
end_date=end_date
)
rental_price_feeds = client.price_feed.rental_price_feed.retrieve(
parcl_ids=pricefeed_ids,
start_date=start_date,
end_date=end_date
)
price_feed_volatility = client.price_feed.volatility.retrieve(
parcl_ids=pricefeed_ids,
start_date=start_date,
end_date=end_date
)
Property
Property Search Markets
Gets a list of unique identifiers (parcl_property_id) for units that correspond to specific markets or parameters defined by the user. The parcl_property_id is key to navigating the Parcl Labs API, serving as the core mechanism for retrieving unit-level information.
invitation_homes_tampa_units = client.property.search.retrieve(
parcl_ids=[2900417],
property_type='single_family',
current_entity_owner_name='invitation_homes',
)
rental_buy_box = client.property.search.retrieve(
parcl_ids=[2900417],
property_type='single_family',
square_footage_min=1000,
square_footage_max=2500,
bedrooms_min=2,
bedrooms_max=5,
year_built_min=2010,
year_built_max=2023,
event_history_rental_flag=True,
)
parcl_property_id_list = rental_buy_box['parcl_property_id'].tolist()
Property Event History
Gets unit-level properties and their housing event history, including sales, listings, and rentals. The response includes detailed property information and historical event data for each specified property.
sale_events = client.property.events.retrieve(
parcl_property_ids=parcl_property_id_list[0:10],
event_type='SALE',
start_date='2020-01-01',
end_date='2024-06-30'
)
rental_events = client.property.events.retrieve(
parcl_property_ids=parcl_property_id_list[0:10],
event_type='RENTAL',
start_date='2020-01-01',
end_date='2024-06-30'
)
Property Address Search
Pass in a list of addresses -- address, unit, city, state_abbreviation, zip_code, source_id
-- and receive the associated parcl_property_id
, if there is a match. unit
and source_id
are optional fields.
addresses = client.property_address.search.retrieve(
addresses=[
{
"address": "123 Main St",
"city": "New York",
"state_abbreviation": "NY",
"zip_code": "10001",
"source_id": "123",
},
{
"address": "6251 coldwater canyon ave",
"unit": "unit 311",
"city": "north hollywood",
"state_abbreviation": "CA",
"zip_code": "91606",
"source_id": "456",
},
]
)
Property Search V2
Gets a list of unique properties and their associated metadata and events based on a set of property, event, and owner filters. Use one of three search methods:
parcl_ids
parcl_property_ids
geo_coordinates
(must provide latitude, longitude, and radius)
NOTE: Use the limit
parameter to specify the number of matched properties to return. If limit
is not provided, all matched properties will be returned. Conceptually, you should set the limit
to retrieve a sample of properties, and then if you want to retrieve all properties, make the same request again without the limit
parameter.
Example request, note that only one of parcl_ids
, parcl_property_ids
, or geo_coordinates
can be provided per request:
results, filter_data = client.property_v2.search.retrieve(
parcl_property_ids=[78353317, 135921544],
event_names=["LISTED_RENT"],
is_new_construction=False,
max_event_date="2024-12-31",
min_event_date="2023-01-01",
max_price=3000,
min_price=100,
is_investor_owned=True,
is_owner_occupied=False,
owner_name=["BLACKSTONE"],
include_property_details=True,
max_beds=5,
min_beds=1,
max_year_built=2020,
min_year_built=1998,
min_baths=1,
min_sqft=500,
max_record_added_date="2024-12-31",
min_record_added_date="2024-12-13",
property_types=["SINGLE_FAMILY", "CONDO", "TOWNHOUSE"],
limit=100,
)
Account Info
Monitor your API usage and quota limits by calling the account()
method in the ParclLabsClient
class.
client = ParclLabsClient(api_key)
account_info = client.account()