The Parcl Labs API contains enrichment layers that can be used to garner deeper understanding on hyperlocal, regional and national real estate markets. Local context matters when making decisions about real estate, and the data to provide that local context is available in the pilot API. Get access to the Parcl Labs API today, for free, in three easy steps:
- Register for the API
- Define the GraphQL query
- Call the API and visualize the results
Step 1: Register for the API
If you haven’t registered for the API, check out our first blog which teaches you the basics of querying the Parcl Labs Price Feed or click the button below. If you’ve already registered, move on the step 2!
After you register you will receive an API key giving you access to the Parcl Labs API. The Parcl Labs API leverages GraphQL to give you access to real time real estate data, demographic data and geospatial data to empower users to perform accurate and timely real estate analysis. If you are not familiar with the Parcl Labs API or GraphQL, you can read our documentation to learn more.
You can retrieve API data with only a couple lines of GraphQL code. For demonstration purposes here we will show you a use case using Python, one of the most popular programming languages for data analysis, but the API can be used in combination with your favorite tech stack. Once you’ve received your key, you can store it as a variable in Python along with the API endpoint URL:
Step 2: Define the GraphQL query
Leveraging the Parcl Labs API, we can provide local context on the Phoenix real estate market by examining the income to price feed ratio in each city in the MSA. Context specific insights allows home buyers and investors to make informed decisions about the market.
First we name our query, in this case PHX_INCOME_BY_PLPF, and then we can query all cities within the “Phoenix-Mesa-Chandler, AZ” MSA from the CITY table (see the Parcl Labs API docs for a comprehensive list of geographies and objects available in the API).
After defining the MSA and level of geography, the columns we output from the CITY table are CITY_NAME and PARCL_ID (our unique identifier of different levels of geography). Within the CITY geographies is a nested table, census, containing the income data. In the example below we query census at the geography we defined with a parameter of year equal to 2020 (there are census values for every year and we only want one population value for each category). The price feed table is also nested under the CITY geography so we lastly grab an average of the price feed over the last 365 days for each city. This is what the query would look like:
Step 3: Call the API and visualize the results
Once you have plugged in your query, the URL and API key you can call the API with Python:
The next step is to flatten the JSON response into a dataframe and divide income by the price feed to get the income to price feed ratio:
And finally visualize it with your choice of visualization libraries, here we use Plotly:
Based on our parameters, this outputs a bar chart showing the income to price feed ratio at the city level for the 15 most affordable in the Phoenix MSA. This allows us to understand where homebuyers’ income goes the furthest, with all data coming from the Parcl Labs API.
Pilot API data is currently in beta and may not exactly match our published content.
Unsurprisingly, the more affordable cities are the smaller cities on the outer edges of the MSA. Here the median incomes are lower than the larger centralized cities, but due to even lower home prices that income to price feed ratio outpaces the larger metropolitan counterparts. This provides valuable context, especially for younger job-seekers looking to balance income and affordability. Additional information such as amenity density - why the prices are so much lower - would be useful to understand the income and pricing dynamics. This context can give buyers, investors and developers insights into the evolution of a market, not only where it’s been but also where it’s going.
You can register here for early access to our API and start getting insights into your markets well ahead of others.
Check out the full notebook to run this code yourself!
Disclaimer: The material contained on this website is provided for educational and informational purposes only, without any express or implied warranty of any kind. The information on this website does not constitute the provision of investment, tax, legal or other professional advice. No reliance may be placed for any purpose on the information and opinions contained herein or their accuracy or completeness, and nothing contained herein may be relied upon in making any investment decision.