A short list of suggestions, governments first, then addresses and parcel numbers that start with what was typed.
Each carries the query to send to reach it and, where the thing already has a path, its href. Free.
Parameters
query
- qrequiredstring
- What has been typed so far.
- kind"address" | "parcel" | "jurisdiction"[] | null
- Only these kinds. One of
address,parcelorjurisdiction. Repeatable. Every kind when omitted. - jurisdictionstring[] | null
- A jurisdiction id. Only addresses and parcels within it. Repeatable.
- fipsstring[] | null
- A US Census GEOID, 2 digits for a state or 5 for a county. Only addresses and parcels within it. Repeatable.
- sizeinteger
- How many to return. Defaults to 8.
Responses
- 401
- ProblemDetail
credential_missing,credential_invalidorcredential_expired: send a live API key asAuthorization: Bearer <key>.- 402
- ProblemDetail
quota_exhausted: the balance can't cover the call. Nothing was charged and nothing was returned.- 403
- ProblemDetail
scope_missing,person_requiredorentitlement_missing: this credential or plan can't do this.detailsays which.- 404
- ProblemDetail
no_such_resource: nothing has that id.- 409
- ProblemDetail
version_conflict: the record changed since you read it. Read it again and resend.- 422
- ProblemDetail
parameter_invalid,id_malformedor a cursor code: a parameter's value isn't one this operation takes.- 429
- ProblemDetail
rate_limited: wait forRetry-After, then send it again. Not charged.- 501
- empty
not_available: nothing is published to suggest from yet.
Example request
curl -G 'https://api.placestack.com/v1/suggestion' \
--data-urlencode 'q=value' \
-H "Authorization: Bearer $PLACESTACK_API_KEY"Example response
{
"object": "list",
"data": [
{
"object": "suggestion",
"kind": "address",
"label": "<Label>",
"detail": "string",
"query": {
"key": "string"
},
"href": "string"
}
],
"has_more": true,
"next_cursor": "string",
"suppressed": 0,
"total": {
"value": 1,
"relation": "eq"
}
}