{"openapi":"3.1.0","info":{"title":"Invariant Earth Fetch API","description":"\nFacts about a US coordinate, each with the source that produced it.\n\n1. Click **Authorize** and paste your API key (header `X-API-Key`). Get one free at\n   https://docs.invariant-ai.com/get-api-key\n2. Open `POST /v1/fetch`, click **Try it out**, and send\n   `{\"lat\": 39.0438, \"lng\": -77.4874, \"fields\": [\"elevation\"]}`.\n\nEvery field returns `value`, `unit`, `status` (`ok` / `absent` / `failed`), `source`,\n`source_url`, `confidence`, `fetched_at`, `dataset_vintage` and `cached`. A field that\ncannot be answered is `null` and listed in `partial_failures`; it is never dropped.\n\nAI agents: get a key for your person with the flow in https://api.invariant-ai.com/auth.md (they approve from an\nemail; you poll). The same data is an MCP server at `/mcp` (Streamable HTTP). Setup for Claude, ChatGPT, Cursor and\nCodex: https://docs.invariant-ai.com/mcp/installation\n","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Liveness","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readiness","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadyResponse"}}}}}}},"/v1/meta/fields":{"get":{"tags":["catalog"],"summary":"List the fields /v1/fetch can return","operationId":"meta_fields_v1_meta_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaFieldsResponse"}}}}}}},"/v1/fetch":{"post":{"tags":["fetch"],"summary":"Fetch fields for one US coordinate","operationId":"fetch_v1_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchResponse"}}}},"400":{"description":"invalid_request, coord_out_of_bounds, fields_unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/enrich":{"post":{"tags":["enrich"],"summary":"Enrich the parcel that contains one US coordinate","operationId":"enrich_v1_enrich_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichResponse"}}}},"400":{"description":"invalid_request, coord_out_of_bounds, fields_unknown","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/enrich/fields":{"get":{"tags":["enrich"],"summary":"List the fields and presets /v1/enrich can return","operationId":"enrich_fields_v1_enrich_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichFieldsResponse"}}}}}}},"/v1/geocode":{"post":{"tags":["geocode"],"summary":"Resolve a US street address to a coordinate","description":"Resolve a US street address to a coordinate, with the **quality** of that coordinate.\n\nRead `accuracy_type` before trusting the point. `rooftop` is an authoritative address point (US DOT National Address\nDatabase, via Overture Maps) for this exact address. `range_interpolation` is the US Census street-range estimate,\nreturned when no address point matched; in rural areas it can land on a neighbouring property.\n\nText that names an area rather than a property (no house number, or no ZIP and no city and state) is refused with\n`404 address_too_coarse` instead of a centroid, as is an address whose ZIP or city exists but holds no such\nproperty. `404 address_not_found` means not even the place was found. A PO box is refused with\n`422 address_form_unsupported`. Retryable failures\n(`429 geocode_busy`, `502 geocode_upstream_error`, `504 geocode_timeout`) carry `Retry-After`.\n\nPass `lat` and `lng` from the answer to `POST /v1/fetch` for data at the location.","operationId":"geocode_v1_geocode_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeocodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeocodeResponse"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"address_not_found, address_too_coarse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"address_form_unsupported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"geocode_busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"geocode_upstream_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"geocode_timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/proximity":{"post":{"tags":["proximity"],"summary":"Distance, nearest, drive-time screen and labor shed","description":"Distance and drive time between places, the nearest curated places, drive-time screens and labor sheds.\n\n`op` picks the operation: `distance` (every origin to every destination), `nearest` (the closest records of a curated\nset), `screen` (which origins are within a drive-time band of any anchor) and `labor_shed` (civilian labor force and\npopulation within a drive time). Locators are `\"lat,lng\"` text or US street addresses, never place names; each is echoed\nback with how it resolved, and one that fails is left out of the results and named in `notes`.\n\nStraight-line work (`mode: \"straightline\"`) and labor-shed estimates are pure geometry. Driving work needs this\ndeployment's routing engine; without one it answers `503 proximity_unconfigured`.","operationId":"proximity_v1_proximity_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DistanceOp"},{"$ref":"#/components/schemas/NearestOp"},{"$ref":"#/components/schemas/ScreenOp"},{"$ref":"#/components/schemas/LaborShedOp"}],"title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DistanceResponse"},{"$ref":"#/components/schemas/NearestResponse"},{"$ref":"#/components/schemas/ScreenResponse"},{"$ref":"#/components/schemas/LaborShedResponse"},{"$ref":"#/components/schemas/LaborShedEstimateResponse"}],"title":"Response Proximity V1 Proximity Post"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"unresolvable_input, unknown_set, shed_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"proximity_busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"upstream_transient","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"proximity_unconfigured, proximity_data_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"proximity_deadline_exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/keys/verify-email":{"post":{"tags":["keys"],"summary":"Email a 6-digit code","description":"Sends a one-time code to the address. Send it back as `code` on POST /v1/keys within 10 minutes. No key needed.","operationId":"verify_email_v1_keys_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResponse"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"email_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/signup-config":{"get":{"tags":["keys"],"summary":"What the sign-up page needs","operationId":"signup_config_v1_keys_signup_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupConfigResponse"}}}}}}},"/v1/keys":{"post":{"tags":["keys"],"summary":"Create an API key","description":"Creates a key and returns it **once**; only a hash is stored. Needs proof of the email: the 6-digit `code` from POST /v1/keys/verify-email, or a `google_id_token` from Sign in with Google.","operationId":"create_key_v1_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyResponse"}}}},"400":{"description":"invalid_request, verification_required, invalid_code, code_expired, invalid_google_token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"too_many_keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/me":{"get":{"tags":["keys"],"summary":"Describe the key you are calling with","operationId":"key_me_v1_keys_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInfo"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"delete":{"tags":["keys"],"summary":"Revoke the key you are calling with","operationId":"revoke_me_v1_keys_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeKeyResponse"}}}},"400":{"description":"bootstrap_key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"auth_missing, auth_invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/agent-signup":{"post":{"tags":["keys"],"summary":"Start an agent sign-up","description":"For AI agents: emails the person an approval link and returns a `user_code` to show them and a `claim_token` to poll with. See https://api.invariant-ai.com/auth.md","operationId":"agent_signup_v1_agent_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSignupResponse"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"email_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent-signup/token":{"post":{"tags":["keys"],"summary":"Poll an agent sign-up","description":"Poll every `interval` seconds. `approved` carries the key exactly once; after that the token is unknown.","operationId":"agent_token_v1_agent_signup_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTokenResponse"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp":{"post":{"tags":["mcp"],"summary":"Model Context Protocol (Streamable HTTP)","operationId":"mcp_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccuracyType":{"type":"string","enum":["rooftop","range_interpolation"],"title":"AccuracyType","description":"How the coordinate was placed (the same vocabulary Mireye uses)."},"AgentSignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"The person who will approve the key (ask them; do not guess)."},"key_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Key Name"},"client_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Name","description":"Your agent or tool, shown to the person."}},"additionalProperties":false,"type":"object","required":["email"],"title":"AgentSignupRequest","examples":[{"client_name":"Claude Code","email":"pat@example.com","key_name":"Research bot"}]},"AgentSignupResponse":{"properties":{"claim_token":{"type":"string","title":"Claim Token","description":"Secret. Send it to POST /v1/agent-signup/token; never show it."},"user_code":{"type":"string","title":"User Code","description":"Show this to the person; the approval page and email show the same code."},"verification_uri":{"type":"string","title":"Verification Uri","description":"Where the person can approve with Google (the email has a direct link)."},"expires_in":{"type":"integer","title":"Expires In"},"interval":{"type":"integer","title":"Interval","description":"Seconds between polls."}},"type":"object","required":["claim_token","user_code","verification_uri","expires_in","interval"],"title":"AgentSignupResponse"},"AgentTokenRequest":{"properties":{"claim_token":{"type":"string","maxLength":128,"title":"Claim Token"}},"additionalProperties":false,"type":"object","required":["claim_token"],"title":"AgentTokenRequest"},"AgentTokenResponse":{"properties":{"status":{"type":"string","title":"Status","description":"pending | slow_down | expired | denied | approved"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Only with approved, exactly once."},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"key_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"dashboard_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dashboard Url"}},"type":"object","required":["status"],"title":"AgentTokenResponse"},"AnalysisPointResponse":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"method":{"type":"string","title":"Method","description":"input_point: the request coordinate, which lies inside the matched parcel."},"source":{"type":"string","title":"Source"}},"type":"object","required":["lat","lng","method","source"],"title":"AnalysisPointResponse"},"CandidateOut":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"distance_miles":{"type":"number","title":"Distance Miles"},"distance_km":{"type":"number","title":"Distance Km"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Minutes"}},"type":"object","required":["name","lat","lng","attributes","distance_miles","distance_km","duration_seconds","duration_minutes"],"title":"CandidateOut"},"Confidence":{"type":"string","enum":["high","medium","low","unknown"],"title":"Confidence"},"CreateKeyRequest":{"properties":{"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"The address the code was sent to. Optional with google_id_token."},"name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Name","description":"A label for the key."},"code":{"anyOf":[{"type":"string","maxLength":6,"minLength":6,"pattern":"^[0-9]{6}$"},{"type":"null"}],"title":"Code","description":"The 6-digit code from POST /v1/keys/verify-email."},"google_id_token":{"anyOf":[{"type":"string","maxLength":4096},{"type":"null"}],"title":"Google Id Token","description":"A Google ID token from Sign in with Google, in place of email + code."}},"additionalProperties":false,"type":"object","title":"CreateKeyRequest","examples":[{"code":"042917","email":"you@company.com","name":"laptop"},{"google_id_token":"eyJhbGciOiJSUzI1NiIs...","name":"laptop"}]},"CreateKeyResponse":{"properties":{"key":{"type":"string","title":"Key","description":"The API key. Shown once; store it now."},"key_id":{"type":"string","title":"Key Id"},"key_prefix":{"type":"string","title":"Key Prefix","description":"First characters of the key, safe to display."},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["key","key_id","key_prefix","email","name","created_at"],"title":"CreateKeyResponse"},"DistanceOp":{"properties":{"max_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,6})?$"},{"type":"null"}],"title":"Max Cost Usd","description":"Accepted for Mireye compatibility; this API does not charge per calculation."},"op":{"type":"string","const":"distance","title":"Op"},"origins":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Origins","description":"1 to 500 start places. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"destinations":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Destinations","description":"1 to 500 end places. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"mode":{"$ref":"#/components/schemas/Mode","description":"driving: road distance and duration. straightline: geodesic distance only.","default":"driving"},"units":{"type":"string","enum":["miles","km"],"title":"Units","description":"Reserved: legs always carry both miles and km.","default":"miles"}},"additionalProperties":false,"type":"object","required":["op","origins","destinations"],"title":"DistanceOp"},"DistanceResponse":{"properties":{"op":{"type":"string","const":"distance","title":"Op","default":"distance"},"legs":{"items":{"$ref":"#/components/schemas/LegOut"},"type":"array","title":"Legs"},"resolved_origins":{"items":{"$ref":"#/components/schemas/ResolvedPointOut"},"type":"array","title":"Resolved Origins"},"resolved_destinations":{"items":{"$ref":"#/components/schemas/ResolvedPointOut"},"type":"array","title":"Resolved Destinations"},"paid_driving_calcs":{"type":"integer","title":"Paid Driving Calcs"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["legs","resolved_origins","resolved_destinations","paid_driving_calcs","notes"],"title":"DistanceResponse"},"EnrichFieldMeta":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"kind":{"$ref":"#/components/schemas/EnrichKind","description":"parcel_record: read from the matched parcel record. point: the /v1/fetch field of the same name, answered at the analysis point."},"presets":{"items":{"$ref":"#/components/schemas/Preset"},"type":"array","title":"Presets"},"type":{"type":"string","title":"Type"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"description":{"type":"string","title":"Description"},"null_meaning":{"type":"string","title":"Null Meaning"}},"type":"object","required":["name","label","kind","presets","type","unit","source","source_url","description","null_meaning"],"title":"EnrichFieldMeta"},"EnrichFieldResponse":{"properties":{"value":{"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"confidence":{"$ref":"#/components/schemas/Confidence"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"dataset_vintage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Vintage"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["value","unit","source","source_url","confidence","fetched_at"],"title":"EnrichFieldResponse"},"EnrichFieldsResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/EnrichFieldMeta"},"type":"array","title":"Fields"},"presets":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Presets","description":"Every preset and the fields it currently expands to."}},"type":"object","required":["fields","presets"],"title":"EnrichFieldsResponse"},"EnrichKind":{"type":"string","enum":["parcel_record","point","calculated","derived"],"title":"EnrichKind"},"EnrichRequest":{"properties":{"lat":{"type":"number","title":"Lat","description":"Latitude, WGS84 decimal degrees."},"lng":{"type":"number","title":"Lng","description":"Longitude, WGS84 decimal degrees."},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1},{"type":"null"}],"title":"Fields","description":"Enrich field names. See GET /v1/enrich/fields. Omit both fields and preset for every field."},"preset":{"anyOf":[{"items":{"$ref":"#/components/schemas/Preset"},"type":"array","minItems":1},{"type":"null"}],"title":"Preset","description":"Named field bundles, expanded before fields."}},"additionalProperties":false,"type":"object","required":["lat","lng"],"title":"EnrichRequest","examples":[{"fields":["gisacre"],"lat":39.0438,"lng":-77.4874},{"lat":39.0438,"lng":-77.4874,"preset":["parcel"]}]},"EnrichResponse":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"resolved_location":{"$ref":"#/components/schemas/ResolvedLocation"},"parcel_match":{"$ref":"#/components/schemas/ParcelMatchResponse"},"analysis_point":{"anyOf":[{"$ref":"#/components/schemas/AnalysisPointResponse"},{"type":"null"}],"description":"Where point fields were answered; null when no point field was asked or no parcel matched."},"fields":{"additionalProperties":{"$ref":"#/components/schemas/EnrichFieldResponse"},"type":"object","title":"Fields","description":"Only fields with a value."},"field_omissions":{"additionalProperties":{"$ref":"#/components/schemas/FieldOmission"},"type":"object","title":"Field Omissions","description":"Every requested field without a value, and why."}},"type":"object","required":["lat","lng","fetched_at","resolved_location","parcel_match","fields","field_omissions"],"title":"EnrichResponse"},"ErrorBody":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable"}},"type":"object","required":["error","message"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"detail":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["detail"],"title":"ErrorResponse"},"FetchRequest":{"properties":{"lat":{"type":"number","title":"Lat","description":"Latitude, WGS84 decimal degrees."},"lng":{"type":"number","title":"Lng","description":"Longitude, WGS84 decimal degrees."},"fields":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Fields","description":"Field names. See GET /v1/meta/fields."}},"additionalProperties":false,"type":"object","required":["lat","lng","fields"],"title":"FetchRequest","examples":[{"fields":["elevation"],"lat":39.0438,"lng":-77.4874}]},"FetchResponse":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/FieldResponse"},"type":"object","title":"Fields"},"partial_failures":{"items":{"$ref":"#/components/schemas/PartialFailure"},"type":"array","title":"Partial Failures"},"resolved_location":{"$ref":"#/components/schemas/ResolvedLocation"}},"type":"object","required":["lat","lng","fetched_at","fields","partial_failures","resolved_location"],"title":"FetchResponse"},"FieldMeta":{"properties":{"name":{"type":"string","title":"Name"},"layer":{"type":"string","title":"Layer"},"type":{"type":"string","title":"Type"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources","description":"Sources tried in order; later ones answer only if earlier ones cannot."},"ttl_seconds":{"type":"integer","title":"Ttl Seconds"},"description":{"type":"string","title":"Description"},"null_meaning":{"type":"string","title":"Null Meaning"}},"type":"object","required":["name","layer","type","unit","source","source_url","sources","ttl_seconds","description","null_meaning"],"title":"FieldMeta"},"FieldOmission":{"properties":{"state":{"$ref":"#/components/schemas/OmissionState"},"reason":{"type":"string","title":"Reason"},"retryable":{"type":"boolean","title":"Retryable"}},"type":"object","required":["state","reason","retryable"],"title":"FieldOmission"},"FieldResponse":{"properties":{"value":{"title":"Value","description":"The value, or null when status is absent or failed."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"status":{"$ref":"#/components/schemas/Status"},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"confidence":{"$ref":"#/components/schemas/Confidence"},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At"},"dataset_vintage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Vintage"},"ttl_seconds":{"type":"integer","title":"Ttl Seconds"},"cached":{"type":"boolean","title":"Cached","description":"True when served from this service's cache."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["value","unit","status","source","source_url","confidence","fetched_at","ttl_seconds","cached"],"title":"FieldResponse"},"GeocodeProvider":{"type":"string","enum":["address_point","census"],"title":"GeocodeProvider","description":"Which tier answered."},"GeocodeRequest":{"properties":{"address":{"type":"string","maxLength":256,"minLength":1,"title":"Address","description":"One-line US street address: house number, street, city, state, ZIP."}},"additionalProperties":false,"type":"object","required":["address"],"title":"GeocodeRequest","examples":[{"address":"1600 Pennsylvania Ave NW, Washington, DC 20500"}]},"GeocodeResponse":{"properties":{"lat":{"type":"number","title":"Lat","description":"Latitude, WGS84."},"lng":{"type":"number","title":"Lng","description":"Longitude, WGS84."},"accuracy":{"type":"number","title":"Accuracy","description":"Match score 0 to 1: 1.0 is the exact street and ZIP at an address point."},"accuracy_type":{"$ref":"#/components/schemas/AccuracyType","description":"`rooftop`: an authoritative address point for this address. `range_interpolation`: estimated along the street from its address range (can be hundreds of metres to ~3 km off in rural areas)."},"match_type":{"$ref":"#/components/schemas/MatchType"},"normalized_address":{"type":"string","title":"Normalized Address","description":"The address as matched, USPS style."},"provider":{"$ref":"#/components/schemas/GeocodeProvider","description":"`address_point` (National Address Database points) or `census` (street ranges)."},"source":{"type":"string","title":"Source","description":"Dataset the coordinate came from."}},"type":"object","required":["lat","lng","accuracy","accuracy_type","match_type","normalized_address","provider","source"],"title":"GeocodeResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","const":"ok","title":"Status","default":"ok"}},"type":"object","title":"HealthResponse"},"KeyInfo":{"properties":{"key_id":{"type":"string","title":"Key Id"},"key_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Prefix"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"type":"string","title":"Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"revoked":{"type":"boolean","title":"Revoked"}},"type":"object","required":["key_id","key_prefix","email","name","created_at","revoked"],"title":"KeyInfo"},"LaborShedEstimateResponse":{"properties":{"op":{"type":"string","const":"labor_shed","title":"Op","default":"labor_shed"},"estimate":{"type":"boolean","const":true,"title":"Estimate","default":true},"origin":{"$ref":"#/components/schemas/ResolvedPointOut"},"minutes":{"type":"integer","title":"Minutes"},"annulus_tracts":{"type":"integer","title":"Annulus Tracts","description":"Tracts a full run would route: a maximum, before failed routes are excluded."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["origin","minutes","annulus_tracts","notes"],"title":"LaborShedEstimateResponse"},"LaborShedOp":{"properties":{"max_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,6})?$"},{"type":"null"}],"title":"Max Cost Usd","description":"Accepted for Mireye compatibility; this API does not charge per calculation."},"op":{"type":"string","const":"labor_shed","title":"Op"},"origin":{"type":"string","title":"Origin","description":"The centre of the shed. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"minutes":{"type":"integer","maximum":90.0,"minimum":5.0,"title":"Minutes","description":"Drive time of the shed, 5 to 90 minutes."},"estimate":{"type":"boolean","title":"Estimate","description":"Size the shed (annulus_tracts) without routing anything.","default":false},"include":{"items":{"type":"string","const":"demographics"},"type":"array","maxItems":1,"title":"Include"}},"additionalProperties":false,"type":"object","required":["op","origin","minutes"],"title":"LaborShedOp"},"LaborShedResponse":{"properties":{"op":{"type":"string","const":"labor_shed","title":"Op","default":"labor_shed"},"origin":{"$ref":"#/components/schemas/ResolvedPointOut"},"civilian_labor_force":{"type":"number","title":"Civilian Labor Force","description":"ACS 2020-2024 B23025 civilian labor force, summed over reachable tracts."},"population":{"type":"number","title":"Population","description":"CenPop2020 population, summed over reachable tracts."},"tracts_counted":{"type":"integer","title":"Tracts Counted"},"tracts_matrix_queried":{"type":"integer","title":"Tracts Matrix Queried"},"tracts_unreachable":{"type":"integer","title":"Tracts Unreachable"},"minutes":{"type":"integer","title":"Minutes"},"paid_driving_calcs":{"type":"integer","title":"Paid Driving Calcs"},"demographics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Demographics","description":"Present only when include has \"demographics\"."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["origin","civilian_labor_force","population","tracts_counted","tracts_matrix_queried","tracts_unreachable","minutes","paid_driving_calcs","notes"],"title":"LaborShedResponse"},"LegOut":{"properties":{"origin_index":{"type":"integer","title":"Origin Index"},"destination_index":{"type":"integer","title":"Destination Index"},"distance_miles":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance Miles"},"distance_km":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance Km"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Minutes"},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"}},"type":"object","required":["origin_index","destination_index","distance_miles","distance_km","duration_seconds","duration_minutes","flag"],"title":"LegOut"},"MatchStatus":{"type":"string","enum":["matched","no_match","unavailable","not_attempted"],"title":"MatchStatus"},"MatchType":{"type":"string","enum":["address_point","building_centroid","street_range"],"title":"MatchType"},"MetaFieldsResponse":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/FieldMeta"},"type":"array","title":"Fields"}},"type":"object","required":["fields"],"title":"MetaFieldsResponse"},"Mode":{"type":"string","enum":["driving","straightline"],"title":"Mode"},"NearestOp":{"properties":{"max_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,6})?$"},{"type":"null"}],"title":"Max Cost Usd","description":"Accepted for Mireye compatibility; this API does not charge per calculation."},"op":{"type":"string","const":"nearest","title":"Op"},"origin":{"type":"string","title":"Origin","description":"The start place. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"set":{"type":"string","title":"Set","description":"@airports, @substations, @power_plants, @rail, @ports, @urban_areas or @hospitals."},"n":{"type":"integer","maximum":25.0,"minimum":1.0,"title":"N","default":3},"filters":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"type":"object"},{"type":"null"}],"title":"Filters","description":"Set-specific filters, e.g. {\"min_kv\": 230}."},"mode":{"$ref":"#/components/schemas/Mode","default":"driving"},"radius_m":{"anyOf":[{"type":"number","maximum":50000.0,"minimum":1.0},{"type":"null"}],"title":"Radius M","description":"@places only."},"return":{"type":"string","enum":["candidates","count"],"title":"Return","description":"@places only.","default":"candidates"}},"additionalProperties":false,"type":"object","required":["op","origin","set"],"title":"NearestOp"},"NearestResponse":{"properties":{"op":{"type":"string","const":"nearest","title":"Op","default":"nearest"},"origin":{"$ref":"#/components/schemas/ResolvedPointOut"},"candidates":{"items":{"$ref":"#/components/schemas/CandidateOut"},"type":"array","title":"Candidates"},"applied_filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Applied Filters"},"paid_driving_calcs":{"type":"integer","title":"Paid Driving Calcs"},"billed_results":{"type":"integer","title":"Billed Results"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["origin","candidates","applied_filters","paid_driving_calcs","billed_results","notes"],"title":"NearestResponse"},"OmissionState":{"type":"string","enum":["source_reported_absence","no_parcel","source_failure","restricted","calculation_unavailable"],"title":"OmissionState"},"ParcelMatchResponse":{"properties":{"status":{"$ref":"#/components/schemas/MatchStatus"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why there is no match, or why the lookup did not happen."},"parcel":{"anyOf":[{"$ref":"#/components/schemas/ParcelRefResponse"},{"type":"null"}]},"candidates":{"items":{"$ref":"#/components/schemas/ParcelRefResponse"},"type":"array","title":"Candidates","description":"Nearby parcels that do not contain the point; never enriched."},"source":{"type":"string","title":"Source"},"source_url":{"type":"string","title":"Source Url"},"dataset_vintage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Vintage"},"cached":{"type":"boolean","title":"Cached"}},"type":"object","required":["status","reason","parcel","candidates","source","source_url","dataset_vintage","cached"],"title":"ParcelMatchResponse"},"ParcelRefResponse":{"properties":{"parcel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcel Id","description":"The parcel source's stable id for the parcel."},"apn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apn","description":"Assessor parcel number as the county formats it."},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"match_type":{"type":"string","title":"Match Type","description":"exact_intersect when the parcel contains the point."},"match_distance_m":{"type":"number","title":"Match Distance M"}},"type":"object","required":["parcel_id","apn","address","match_type","match_distance_m"],"title":"ParcelRefResponse"},"PartialFailure":{"properties":{"field":{"type":"string","title":"Field"},"source":{"type":"string","title":"Source"},"error":{"type":"string","title":"Error"},"retryable":{"type":"boolean","title":"Retryable"}},"type":"object","required":["field","source","error","retryable"],"title":"PartialFailure"},"Preset":{"type":"string","enum":["parcel","zoning","buildings","valuation","legal","power","access","water","terrain","environment","climate","hazards","market","constraints"],"title":"Preset","description":"Named field bundles. All fourteen are accepted now; each lists the fields built so far."},"ReadyResponse":{"properties":{"status":{"type":"string","const":"ready","title":"Status","default":"ready"},"version":{"type":"string","title":"Version"},"fields":{"items":{"type":"string"},"type":"array","title":"Fields"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"},"key_store":{"type":"string","title":"Key Store"},"bootstrap_keys":{"type":"integer","title":"Bootstrap Keys"},"cache":{"additionalProperties":{"type":"integer"},"type":"object","title":"Cache"},"shared_cache":{"type":"string","title":"Shared Cache","description":"redis: one cache for every worker; memory: this worker only."},"shared_cache_reachable":{"type":"boolean","title":"Shared Cache Reachable"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"open_circuit_breakers":{"items":{"type":"string"},"type":"array","title":"Open Circuit Breakers","default":[]}},"type":"object","required":["version","fields","sources","key_store","bootstrap_keys","cache","shared_cache","shared_cache_reachable","started_at"],"title":"ReadyResponse"},"ResolvedLocation":{"properties":{"lat":{"type":"number","title":"Lat"},"lng":{"type":"number","title":"Lng"},"source":{"type":"string","const":"coordinate","title":"Source","default":"coordinate"}},"type":"object","required":["lat","lng"],"title":"ResolvedLocation"},"ResolvedPointOut":{"properties":{"query":{"type":"string","title":"Query"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"},"lng":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lng"},"formatted_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formatted Address"},"accuracy_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accuracy Type"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["query","lat","lng","formatted_address","accuracy_type","accuracy","error"],"title":"ResolvedPointOut"},"RevokeKeyResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"revoked":{"type":"boolean","title":"Revoked"}},"type":"object","required":["key_id","revoked"],"title":"RevokeKeyResponse"},"ScreenOp":{"properties":{"max_cost_usd":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9][0-9]*)(?:\\.[0-9]{1,6})?$"},{"type":"null"}],"title":"Max Cost Usd","description":"Accepted for Mireye compatibility; this API does not charge per calculation."},"op":{"type":"string","const":"screen","title":"Op"},"origins":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Origins","description":"1 to 500 places to test. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"anchors":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Anchors","description":"1 to 10 places to measure to. A US street address with city and state or ZIP, or a \"lat,lng\" coordinate such as \"40.63,-73.97\" (never a place name)."},"max_minutes":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Max Minutes","description":"Keep an origin whose best drive is at most this many minutes."},"min_minutes":{"anyOf":[{"type":"integer","maximum":300.0,"minimum":0.0},{"type":"null"}],"title":"Min Minutes","description":"Also require the best drive to be at least this long."}},"additionalProperties":false,"type":"object","required":["op","origins","anchors","max_minutes"],"title":"ScreenOp"},"ScreenResponse":{"properties":{"op":{"type":"string","const":"screen","title":"Op","default":"screen"},"survivors":{"items":{"$ref":"#/components/schemas/SurvivorOut"},"type":"array","title":"Survivors"},"screened_out":{"items":{"$ref":"#/components/schemas/ScreenedOutOut"},"type":"array","title":"Screened Out"},"resolved_origins":{"items":{"$ref":"#/components/schemas/ResolvedPointOut"},"type":"array","title":"Resolved Origins"},"resolved_anchors":{"items":{"$ref":"#/components/schemas/ResolvedPointOut"},"type":"array","title":"Resolved Anchors"},"paid_driving_calcs":{"type":"integer","title":"Paid Driving Calcs"},"notes":{"items":{"type":"string"},"type":"array","title":"Notes"}},"type":"object","required":["survivors","screened_out","resolved_origins","resolved_anchors","paid_driving_calcs","notes"],"title":"ScreenResponse"},"ScreenedOutOut":{"properties":{"origin_index":{"type":"integer","title":"Origin Index"},"best_duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Duration Seconds"},"best_duration_minutes":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Duration Minutes"}},"type":"object","required":["origin_index","best_duration_seconds","best_duration_minutes"],"title":"ScreenedOutOut"},"SignupConfigResponse":{"properties":{"google_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Client Id","description":"Client id for Sign in with Google; null when it is off."},"code_length":{"type":"integer","title":"Code Length"},"code_ttl_s":{"type":"integer","title":"Code Ttl S"},"resend_after_s":{"type":"integer","title":"Resend After S"}},"type":"object","required":["google_client_id","code_length","code_ttl_s","resend_after_s"],"title":"SignupConfigResponse"},"Status":{"type":"string","enum":["ok","absent","failed"],"title":"Status","description":"Outcome of one field at one point."},"SurvivorOut":{"properties":{"origin_index":{"type":"integer","title":"Origin Index"},"best_anchor_index":{"type":"integer","title":"Best Anchor Index"},"best_duration_seconds":{"type":"number","title":"Best Duration Seconds"},"best_duration_minutes":{"type":"number","title":"Best Duration Minutes"}},"type":"object","required":["origin_index","best_anchor_index","best_duration_seconds","best_duration_minutes"],"title":"SurvivorOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Where to send the 6-digit code."}},"additionalProperties":false,"type":"object","required":["email"],"title":"VerifyEmailRequest","examples":[{"email":"you@company.com"}]},"VerifyEmailResponse":{"properties":{"sent":{"type":"boolean","title":"Sent","default":true},"email":{"type":"string","title":"Email"},"expires_in":{"type":"integer","title":"Expires In","description":"Seconds the code stays valid."},"resend_after":{"type":"integer","title":"Resend After","description":"Seconds before another code can be requested."},"code_length":{"type":"integer","title":"Code Length","default":6}},"type":"object","required":["email","expires_in","resend_after"],"title":"VerifyEmailResponse"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","description":"Your Invariant API key.","in":"header","name":"X-API-Key"}}}}