Craigslist API endpoint
Resolves a latitude and longitude to the Craigslist area and subarea that serve it, with the nearest city, state or country code, postal code and search radius. The area_slug is the area value of craigslist_search and the other Craigslist tools.
/craigslist/locationslat (required): -90 to 90.lon (required): -180 to 180.An empty locations list is a valid result for a point no area serves.
| Field | Filled in, of 1 checked | Values in the sample |
|---|---|---|
| area_id | 1 | |
| area_slug | 1 | |
| subarea_id | 1 | |
| city | 1 | “Brooklyn” |
| region | 1 | “NY” |
| country | 1 | “US” |
| postal | 1 | |
| lat | 1 | |
| lon | 1 | |
| radius | 1 | 15 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| lat | number | Yes | Latitude Minimum: -90. Maximum: 90. | 40.7 | |
| lon | number | Yes | Longitude Minimum: -180. Maximum: 180. | -74 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/craigslist/locations?lat=40.7&lon=-74" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"locations": [
{
"area_id": 3,
"area_slug": "newyork",
"subarea_id": 3,
"city": "Brooklyn",
"region": "NY",
"country": "US",
"postal": "11202",
"lat": 40.696,
"lon": -73.994,
"radius": 15
}
]
}
}Request schema
No body schema
Response schema
#/definitions/craigslist.locationsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | craigslist.LocationsResponse | No | ||||
| data.locations | array | No | Location record, 10 fields: area_id, area_slug, city, country, lat, lon, postal, radius, region, subarea_id. Described under Craigslist Search Suggest API. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/craigslist/locations?lat=40.7&lon=-74" \
-H "x-api-key: $CRAWLORA_API_KEY"