100 free credits. No credit card required. Get a key

Gumtree search API

Gumtree ads for a query, category and location with Gumtree’s sort, distance, price and seller filters.

GET /v1/gumtree/search2 credits per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/gumtree/search?query=bike&location_id=london",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 2 credits
{
"url": "https://www.gumtree.com/search?q=bike&search_category=all",
"page": 1,
"total": 53374,
"next_page": 2,
"listings": [
{
"id": "1804963190",
"title": "Merida Black and Green Road Bike, Well Maintained",
"url": "https://www.gumtree.com/p/road-bikes/merida-black-and-green-road-bike-well-maintained/1804963190",
"image": "https://img.gumtree.com/ePR8PyKf84wPHx7_RYmEag/5e994a0c64254b03a9_6f953fb33315/86",
"price": "£800",
"location": "Storrington, West Sussex",
"attributes": [],
"badges": [
"Featured"
]
},
{
"id": "1804553590",
"title": "HONDA CRF 110 2023 MOTOCROSS BIKE VERY TIDY BIKE",
"url": "https://www.gumtree.com/p/honda-motorbikes/honda-crf-110-2023-motocross-bike-very-tidy-bike-/1804553590",
"image": "https://img.gumtree.com/ePR8PyKf84wPHx7_RYmEag/28f0450398b7471aa4_c605441b1f22/86",
"price": "£2,395",
"location": "Salisbury, Wiltshire",
"attributes": [
"2023",
"0 mile",
"… 2 more"
],
"badges": [
"Featured"
]
},
"… 4 more"
],
"breadcrumb": [
{
"name": "For Sale",
"url": "https://www.gumtree.com/for-sale"
},
{
"name": "Sports, Leisure & Travel",
"url": "https://www.gumtree.com/for-sale/sports-leisure-travel"
},
"… 2 more"
]
}

Parameters

NameTypeDescription
queryquerystringSearch words. Example: bike.
urlquerystringOr a gumtree.com search URL to read as is.
pagequeryinteger
sort_byquery"relevance" | "newest" | "price_low" | "price_high"One of relevance, newest, price_low, price_high.
category_idquerystring
location_idquerystring
distancequery"0" | "1" | "3" | "5" | "10" | "15" | "30" | "50" | "75" | "100" | "150" | "250" | "500" | "nationwide"One of 0, 1, 3, 5, 10, 15, 30, 50, 75, 100, 150, 250, 500, nationwide.
min_pricequeryinteger | null
max_pricequeryinteger | null
seller_typequery"private" | "trade"One of private, trade.
attributesquerystringExtra Gumtree URL parameters, k=v&k=v.
Response fields

200 with a GumtreeSearch, in the labels Gumtree’s own listing and ad pages show.

FieldTypeDescription
urlstring
pagenumber
totalnumber | null
next_pagenumber | null
listingsobject[]
breadcrumbobject[]
Status codes
StatusMeaning
200A page of ads.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404The ad, category or location does not exist.
429Too many requests. Wait for Retry-After seconds.
503Gumtree 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.