Clock Icon - Technology Webflow Template
min read

Understand how Housing News Sentiment relates to Real Estate Prices via the Parcl Labs API

Learn how to query housing news sentiment and housing prices in your market with the Parcl Labs API.

In the last API Use Case Blog we went over how to pull housing sentiment from the Parcl Labs API, unlocking a deeper understanding about your local market. Today we are going to dig further, pulling price and sentiment from the API to understand how, if at all, they move together in a given market. Get access to the Parcl Labs API today, for free, in three easy steps:

  1. Register for the API
  2. Define the GraphQL query
  3. 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

The Parcl Labs API contains information on real time real estate, demographic, and housing sentiment data. Housing sentiment updates daily, and is the average tone of newspaper articles about the housing market. By overlaying this geocoded housing sentiment data on geographic boundaries in the API, such as MSAs, users are able to pull daily housing sentiment in a given geography. The proprietary Parcl Labs Price Feed is updated daily at every level of geography as well. This structure allows users to compare price and sentiment, in real time, at any level of geography, a process that will be shown in this article.

First we name the GraphQL query, Sentiment_X_Price, and then query all MSAs from the MSA table (see the Parcl Labs API docs for a comprehensive list of geographies and objects available in the API).

After defining the level of geography, the columns output from the MSA table are MSA_NAME and PARCL_ID (the Parcl Labs unique identifier of unique geographies). Within the MSA geographies are nested tables, real_estate_events (containing sentiment data) and parcl_price_feed. In the example below, sentiment and price are being queried from the past month at the geography defined in the MSA table, in this case the Phoenix MSA. 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, followed by aggregating values and sorting the dataframe. There are many sentiment values per day, so the example below takes the rolling 3 day average of median daily sentiment:

#Pull the data into dataframes and clean/sort sentiment 
Sentiment_df = pd.json_normalize(data, 'real_estate_events', ['MSA_NAME'])
Price_df = pd.json_normalize(data, 'parcl_price_feed', ['MSA_NAME'])

Sentiment_df = Sentiment_df.groupby(['MSA_NAME', 'DATE']).median()
Sentiment_df = Sentiment_df.reset_index()
Sentiment_df['SENTIMENT'] = Sentiment_df['AVG_TONE'].rolling(3).mean()

And finally visualize it with your choice of visualization libraries, here we use Plotly:

Based on our parameters, this outputs a line chart with two lines for both housing price sentiment and the price feed in Phoenix over the last 30 days. This allows us to understand where how potential buyers and sellers are feeling in their respective market and how it related to actual price in the area.

Pilot API data is currently in beta and may not exactly match our published content.

Over the past month, we observed that housing price sentiment has fluctuated. This is to be expected, as is the nature of tracking sentiment daily at the scale of one metropolitan area. However, even through the fluctuations we can see the downward trend over the month; it starts slightly positive through the first few days before slowly moving to below -1 by January 3rd. The price feed follows a similar trend, starting at roughly $250 on December 12th and ending at roughly $245.

It’s no secret that housing prices are falling nationally at the moment, and it makes sense that sentiment around housing price would be correlated with price itself. However, the intersection of these data points in real time unlocks strategic insights.

After falling for 3 straight days, housing sentiment started moving upwards on December 16th; price had a positive movement on December 21st after falling the 4 days prior. After that, price had negative movement everyday until January 3rd; sentiment had one of it’s only 3 consecutive days of positive movement starting on December 31st.

Based on our analysis of sentiment and price data in Phoenix, it appears that sentiment may be a leading indicator of housing price movements. While we can't say for certain without building a model, these trends suggest that tracking sentiment in real time could provide valuable insights for individuals or businesses looking to make strategic decisions related to the housing market. It may be worthwhile to consider building a model to more formally analyze the relationship between sentiment and price, as this would be a useful tool for understanding and predicting housing market trends.

By providing real-time sentiment data, we've made it easy for you to access the insights you need to make confident, informed decisions about the housing market. You can register here for early access to our API now.

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.

Jason Lewris


Jason leads the data team at Parcl Labs. Jason brings his experience from Microsoft and Deloitte where he worked on international data standardization and machine learning problems at scale.