Retrieving Permit History for an Address
This tutorial will show you how to use the Shovels API to retrieve permit history for an address.
When using the Shovels API, it’s important to know how to chain together information from different endpoints to get the data you need.
In this tutorial, we’ll be looking at the multi-step process of retrieving permit history for a given address.
Let’s get into it.
Step-by-Step Recipe
Authenticate
Authenticate with the Shovels API using your API key. For more information on getting started with the Shovels API, please see our API Introduction > Authentication.
Find the Address
Use the GET /v2/addresses/search
endpoint, and enter the address string.
In this example, we’ll use cURL to make the request, and look for the address “123 Main St”.
This will return a list of addresses that match the search string. Pick the one that matches the address you’re looking for originally (you may need to paginate to see the full results).
Retrieve the Address's GEO_ID
From the response body in Step 1, note or otherwise extract the geo_id
of the address. It should look like a alphanumeric string.
The geo_id
is the unique identifier for all location objects in the Shovels platform. These don’t only correspond to individual addresses or property plots, but also exist for other geographical segments like cities
, counties
, jurisdictions
, and states
.
This geo_id
will be what you need for Step 3.
Retrieve Permit History
Use the GET /v2/permits/search
endpoint, and enter the geo_id
you extracted in Step 2.
You will also need to specify the permit_from
and permit_to
strings, which are required fields. These represent the time bounds to search for permits for the given address.
This will return all permits for the given address within the date range you specified.
Do it again (Optional)
Now you have your permit history, and you can repeat this for any other addresses you need data for.
Troubleshooting
Configuring API queries can be tricky, and we’re here to help however we can. Double check our API Troubleshooting guide for further guidance.
Additional help
If you still run into issues with your permit history query, or anything else with the Shovels API, please reach out to us at support@shovels.ai and we’ll be happy to help.
Happy Digging!
Was this page helpful?