# LandSearch Location API Documentation

<p><strong>LandSearch Location API</strong> returns one state, county, city or postal code by slug with its center point, bounding box and parent places. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/landsearch-api/landsearch_location](https://scrappa.co/docs/landsearch-api/landsearch_location)
- **API group:** LandSearch API
- **Endpoint:** `GET https://scrappa.co/api/landsearch/location`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | Location slug from the autocomplete route, for example austin-tx. |

## Example response

```json
{
    "data": {
        "id": 233252,
        "name": "Austin",
        "slug": "austin-tx",
        "type": "locality",
        "label": null,
        "bounds": {
            "east": -97.52759,
            "west": -97.93835,
            "north": 30.51686,
            "south": 30.07558
        },
        "center": {
            "latitude": 30.267153,
            "longitude": -97.743057
        },
        "division": "Zip Code",
        "ancestors": [
            {
                "id": 1082,
                "name": "Travis",
                "slug": "travis-county-tx",
                "type": "subterritory",
                "label": "County"
            },
            {
                "id": 3,
                "name": "Texas Blacklands",
                "slug": "texas-blacklands-tx",
                "type": "region",
                "label": null
            },
            {
                "id": 44,
                "name": "Texas",
                "slug": "texas",
                "type": "territory",
                "label": null
            },
            {
                "id": 1,
                "name": "United States",
                "slug": "united-states",
                "type": "country",
                "label": null
            }
        ],
        "population": null,
        "state_code": "TX"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "location"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 404 | Not Found | The location slug is unknown. This response is not billable. |
| 503 | Upstream Unavailable | LandSearch could not be reached. Retry shortly. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
