Gumtree locations API
Gumtree places matching a partial name, with ids and coordinates.
GET /v1/gumtree/locations1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/gumtree/locations?query=manch",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "query": "manch", "locations": [ { "id": 10000352, "name": "Manchester", "latitude": 53.499883, "longitude": -2.280632, "type": "location", "city": "Manchester" }, { "id": 27004, "name": "Manchester City Centre, Manchester", "latitude": 53.480411, "longitude": -2.239651, "type": "location", "city": "Manchester" }, "… 1 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Partial place name or postcode. Example: manch. |
location_typequery | "LOCATION" | "OUTCODE" | "POSTCODE" | One of LOCATION, OUTCODE, POSTCODE. |
Response fields
200 with a GumtreeLocations, in the labels Gumtree’s own listing and ad pages show.
| Field | Type | Description |
|---|---|---|
query | string | |
locations | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | Locations. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The ad, category or location does not exist. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Gumtree is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Gumtree is a trademark of Gumtree.com Limited. We are not affiliated with or endorsed by Gumtree.