# OLX India Locations API Documentation

<p><strong>OLX India Locations API</strong> returns the public olx.in location state tree. Each entry carries id, name, type, parent id, child count and coordinates. Ids feed the location filter of the search endpoint. No credentials or session are needed.</p>

- **Documentation:** [https://scrappa.co/docs/olx-in-api/olx_in_locations](https://scrappa.co/docs/olx-in-api/olx_in_locations)
- **API group:** OLX India API
- **Endpoint:** `GET https://scrappa.co/api/olx-in/locations`

## 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.

## Example response

```json
{
    "data": {
        "results": [
            {
                "id": 1000001,
                "name": "India",
                "type": "COUNTRY",
                "children_count": 36
            },
            {
                "id": 4058526,
                "name": "Karnataka",
                "type": "STATE",
                "parent_id": 1000001
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 500 | Parser Drift | OLX answered with a response shape this parser does not recognise. Never charged. |
| 503 | Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## 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)
