Skip to content
Scrappa Get API key
LandSearch API 1 credit/request

LandSearch Autocomplete API Documentation

GET https://scrappa.co/api/landsearch/autocomplete

LandSearch Autocomplete API finds states, counties, cities and postal codes by name or postal code. Each suggestion carries the slug that the search and profiles routes take as location, its type and its parent place. Failed requests are not billed.

LandSearch Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/landsearch/autocomplete
Auth header
x-api-key
Cost
1 credit/request
q = coffee shops
Response preview
200 OK
{
    "data": {
        "count": 3,
        "items": [
            {
                "id": 233252,
                "name": "Austin",
                "slug": "austin-tx",
                "type": "locality",
                "label": null,
                "parent": {
                    "id": 1082,
                    "name": "Travis",
                    "slug": "travis-county-tx",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

q string Required

Place name or postal code prefix, 2 to 100 characters.

Example value coffee shops
type string Optional

Keep one kind of place: locality, subterritory (county), postal_code or territory (state).

Example value example
limit integer Optional

Suggestions to return, 1 to 20. Default 10.

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "count": 3,
        "items": [
            {
                "id": 233252,
                "name": "Austin",
                "slug": "austin-tx",
                "type": "locality",
                "label": null,
                "parent": {
                    "id": 1082,
                    "name": "Travis",
                    "slug": "travis-county-tx",
                    "type": "subterritory",
                    "label": "County"
                },
                "state_code": "TX"
            },
            {
                "id": 234407,
                "name": "Austin",
                "slug": "austin-mn",
                "type": "locality",
                "label": null,
                "parent": {
                    "id": 1604,
                    "name": "Mower",
                    "slug": "mower-county-mn",
                    "type": "subterritory",
                    "label": "County"
                },
                "state_code": "MN"
            },
            {
                "id": 258549,
                "name": "Austintown",
                "slug": "austintown-oh",
                "type": "locality",
                "label": null,
                "parent": {
                    "id": 443,
                    "name": "Mahoning",
                    "slug": "mahoning-county-oh",
                    "type": "subterritory",
                    "label": "County"
                },
                "state_code": "OH"
            }
        ],
        "query": "aust"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "page": [
            "The page field must be at least 1."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

LandSearch could not be reached. Retry shortly. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "autocomplete"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "LandSearch could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.