Get an API key
Workflows

Look up a parcel by address

Turn a U.S. street address into an assessor parcel number, county acreage, and parcel floodplain overlap when the sources support them.

To find an assessor parcel number (APN) from a U.S. street address, resolve the address to a coordinate with Geocode, then use Enrich to find the parcel containing that point. Read parcel_match.parcel.apn after confirming the match. Keep the parcel source and jurisdiction with the number, since counties assign and format APNs locally.

Check the address match

Send the house number, street, city, state, and ZIP. Compare normalized_address with the property you intend to check, especially if the matched street direction or ZIP changed. A rooftop result uses a published address point or a centroid of matching address points. Check match_type to see which. A range_interpolation result estimates the location along a street. Use a verified coordinate or county parcel record when that estimate could fall on the wrong parcel.

Run the lookup

Use Python 3 and set INVARIANT_API_KEY to a key from the docs. Save the code as lookup-parcel.py. The example takes an address as its argument and asks you to compare the geocoded address before reading the parcel record.

import json
import os
import sys
from urllib.request import Request, urlopen


def post(path, payload, timeout):
    request = Request(
        "https://api.invariant-ai.com" + path,
        data=json.dumps(payload).encode("utf-8"),
        headers={
            "X-API-Key": os.environ["INVARIANT_API_KEY"],
            "Content-Type": "application/json",
        },
        method="POST",
    )
    with urlopen(request, timeout=timeout) as response:
        return json.load(response)


if len(sys.argv) != 2:
    raise SystemExit('Usage: python3 lookup-parcel.py "full street address"')

geocode = post("/v1/geocode", {"address": sys.argv[1]}, timeout=20)
if geocode["accuracy_type"] != "rooftop":
    raise SystemExit("Verify the address point before looking up a parcel.")
print("Matched address:", geocode["normalized_address"])
print("Address source:", geocode["source"], f"({geocode['match_type']})")
if input("Is this the property you intended? [y/N] ").strip().lower() != "y":
    raise SystemExit("Check the address and rerun the lookup.")

result = post(
    "/v1/enrich",
    {
        "lat": geocode["lat"],
        "lng": geocode["lng"],
        "fields": ["gisacre", "parcel_flood_sfha_fraction"],
    },
    timeout=60,
)
match = result["parcel_match"]
print(json.dumps({
    "parcel_match": match,
    "fields": result["fields"],
    "field_omissions": result["field_omissions"],
}, indent=2))
if match["status"] != "matched":
    raise SystemExit("No confirmed parcel match. Review the status and reason above.")

Try the workflow with the address of the San Francisco Main Library.

python3 lookup-parcel.py "100 Larkin St, San Francisco, CA 94102"

Read the result

Response How to use it
parcel_match.parcel.apn Assessor parcel number as published. Preserve formatting and leading zeros. Use the county record when a filing, deed or legal description needs to be checked.
parcel_match.parcel.parcel_id The parcel source's identifier. Use it with the source to join repeated responses.
fields.gisacre County acreage as reported, which may differ from the area computed from the mapped boundary.
fields.parcel_flood_sfha_fraction The share of the parcel inside FEMA's mapped Special Flood Hazard Area, from 0 to 1. For example, 0.25 means 25% of the parcel. Use the building footprint separately for a building-level question.
field_omissions Why a field is missing, including source coverage, access and failed calculations. A missing flood value stays missing.

A no_match response means the lookup found no containing parcel. Nearby candidates help you review the address or geometry. An unavailable response means the parcel source was unavailable or restricted. For condos or properties spanning several lots, confirm all relevant APNs in the local assessor's records. A point lookup returns the parcel containing the point and does not establish title or resolve the entire property assembly.

Save the address source, match information, and the returned fields with their source_url, fetched_at, and dataset_vintage. Coverage varies by source and by the key's access. For fields measured at the coordinate, use Fetch.

Next