Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.60.0 — 2026-10-12

- **Gumtree Australia + South Africa.** Every `client.gumtree` method takes an optional `market`: `"uk"` (gumtree.com, GBP — the default when unset, so existing calls are unchanged), `"au"` (gumtree.com.au, AUD) or `"za"` (gumtree.co.za, ZAR). uk takes slugs for `category`/`location`; au and za take the numeric ids (as strings) from `list_categories`, `list_locations` and `location_autocomplete` of the same market, e.g. `search(market="za", category="9077", location="3100003")`. `search` `distance` is miles (uk) or km (au) and not offered by za; `urgent_only`/`with_photos` are uk only; `seller_type` is uk and za. za listing ids are the full 26-digit ad id.
- **`gumtree.list_markets()`** returns each market's domain, country, currency, distance unit, page size and id format (`GumtreeMarketsResponse` / `GumtreeMarketInfo`).
- **Behaviour change:** `search` and `search_filters` no longer send `location="uk"` by default — unset means the whole country of the chosen market. `search_filters` also takes `filters` (za: filters already applied, e.g. `"ma:toyota"` to list Toyota models).
- **New response fields:** `market` on every top-level response; `currency` on `SearchResponse`; `short_id`, `price_type` and `seller_name` on listings; `id` on category facets (the au/za category id); `price_type`, `status`, `view_count` and `reply_count` on `ListingDetail`; `member_since_year`, `last_active_text`, `lifetime_listings` and `total_views` on `Seller`.
- Australian `search` and `search_filters` cost 10 credits and Australian `list_locations` 5 credits (browser-rendered); everything else is priced as before.

## 0.59.0 — 2026-10-12

- **Gumtree API — 8 endpoints via `client.gumtree`.** UK classifieds (gumtree.com): `search` (keywords, `category` slug, `location` slug/town/postcode with a `distance` radius in miles, `min_price`/`max_price` in GBP, `sort`, `seller_type`, `urgent_only`, `with_photos`, category-specific `filters="key:value,..."`, `page` 1–50), `search_filters` (a category's filters, sort orders and radius options with live counts), `get_listing` (description, every attribute incl. full vehicle spec and history-check flags, images, location, seller with rating, verification and masked phone, similar listings), `get_seller_listings`, `autocomplete`, `location_autocomplete`, `list_locations` and `list_categories`. Dates come as both Unix `*_utc` and ISO 8601 `*_at`. Models are exported top-level with a `Gumtree` prefix (e.g. `GumtreeListingDetail`).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export SCRAPEBADGER_API_KEY="sb_live_xxxxxxxxxxxxx"
| **Apartments.com** | US rental listings with UNIT-LEVEL pricing — search by location with bed/price filters, plus per-unit rent, beds, baths, sqft and availability for every rentable unit | [Apartments Guide](docs/apartments.md) |
| **Wallapop** | 10 endpoints across Spain, Italy and Portugal — listing search with Wallapop's own filters (incl. cars: year, km, gearbox, horsepower), listing detail, user profile/listings/reviews, autocomplete, categories, search filters and filter options, markets | [Wallapop Docs](https://docs.scrapebadger.com/wallapop/overview) |
| **Walmart** | 11 endpoints (US-only) — search, category browse, deals feed, autocomplete, product detail, reviews, seller profile/products, store detail, markets | [Walmart Guide](docs/walmart.md) |
| **Gumtree** | 8 endpoints (UK-only) — search (category, postcode radius, price, seller type, urgent/photos, category-specific filters), search filters with live counts, listing detail (full vehicle spec, seller rating/verification, masked phone), seller listings, keyword and location autocomplete, location and category trees | [Gumtree Docs](https://docs.scrapebadger.com/gumtree/overview) |
| **Gumtree** | 9 endpoints across UK, Australia and South Africa (`market="uk"` default, `"au"`, `"za"`) — search (category, location/postcode radius, price, seller type, urgent/photos, category-specific filters), search filters with live counts, listing detail (full vehicle spec, seller rating/verification, masked phone), seller listings, keyword and location autocomplete, location and category trees, markets. E.g. `client.gumtree.search(market="au", category="18320", location="3003435", distance=10)` or `client.gumtree.search(market="za", category="9077", location="3100003")` | [Gumtree Docs](https://docs.scrapebadger.com/gumtree/overview) |
| **Baidu** | 4 endpoints — web search (language + date filters), news vertical, image search, autocomplete. Results carry the **real target URL**, not just Baidu's tracking redirect | [Baidu Docs](https://docs.scrapebadger.com/baidu/overview) |
| **Bing** | 6 endpoints — web search (with ads + related searches), image search, video search, news vertical, autocomplete, markets | [Bing Docs](https://docs.scrapebadger.com/bing/overview) |
| **DuckDuckGo** | 7 endpoints — web search (with abstract box), image/news/video search, autocomplete, instant answers, regions | [DuckDuckGo Docs](https://docs.scrapebadger.com/duckduckgo/overview) |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scrapebadger"
version = "0.59.0"
version = "0.60.0"
description = "Official Python SDK for ScrapeBadger - Async web scraping APIs for Twitter and more"
readme = "README.md"
license = { text = "MIT" }
Expand Down
10 changes: 9 additions & 1 deletion src/scrapebadger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ async def main():
from scrapebadger.gumtree.models import (
LocationSuggestion as GumtreeLocationSuggestion,
)
from scrapebadger.gumtree.models import (
MarketInfo as GumtreeMarketInfo,
)
from scrapebadger.gumtree.models import (
MarketsResponse as GumtreeMarketsResponse,
)
from scrapebadger.gumtree.models import (
SearchFilter as GumtreeSearchFilter,
)
Expand Down Expand Up @@ -1329,7 +1335,7 @@ async def main():
ZestimateHistoryPoint as ZillowZestimateHistoryPoint,
)

__version__ = "0.59.0"
__version__ = "0.60.0"

__all__ = [
# TikTok core models
Expand Down Expand Up @@ -1485,6 +1491,8 @@ async def main():
"GumtreeListingSummary",
"GumtreeLocationAutocompleteResponse",
"GumtreeLocationSuggestion",
"GumtreeMarketInfo",
"GumtreeMarketsResponse",
"GumtreeSearchFilter",
"GumtreeSearchResponse",
"GumtreeSeller",
Expand Down
2 changes: 1 addition & 1 deletion src/scrapebadger/_internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
T = TypeVar("T")

# User agent for SDK requests
SDK_VERSION = "0.59.0"
SDK_VERSION = "0.60.0"
USER_AGENT = f"scrapebadger-python/{SDK_VERSION}"


Expand Down
19 changes: 14 additions & 5 deletions src/scrapebadger/gumtree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Gumtree API module for ScrapeBadger SDK.

This module provides an async client for scraping gumtree.com (United Kingdom)
classifieds through the ScrapeBadger API. All methods are async and return
strongly-typed Pydantic models. Gumtree is UK-only, so no method takes a
market/country parameter.
This module provides an async client for scraping Gumtree classifieds through
the ScrapeBadger API: gumtree.com (``market="uk"``, the default),
gumtree.com.au (``"au"``) and gumtree.co.za (``"za"``). All methods are async
and return strongly-typed Pydantic models.

Example:
```python
Expand All @@ -18,10 +18,14 @@
# Listing detail
detail = await client.gumtree.get_listing("1803293391")
print(detail.title, detail.seller.name if detail.seller else None)

# Australia and South Africa take numeric category / location ids
au = await client.gumtree.search("road bike", market="au", location="3003435")
za = await client.gumtree.search(market="za", category="9077", location="3100003")
```
"""

from scrapebadger.gumtree.client import GumtreeClient
from scrapebadger.gumtree.client import GumtreeClient, GumtreeMarket
from scrapebadger.gumtree.models import (
Attribute,
AutocompleteResponse,
Expand All @@ -34,6 +38,8 @@
ListingSummary,
LocationAutocompleteResponse,
LocationSuggestion,
MarketInfo,
MarketsResponse,
SearchFilter,
SearchResponse,
Seller,
Expand All @@ -55,10 +61,13 @@
"FilterOption",
"FiltersResponse",
"GumtreeClient",
"GumtreeMarket",
"ListingDetail",
"ListingSummary",
"LocationAutocompleteResponse",
"LocationSuggestion",
"MarketInfo",
"MarketsResponse",
"SearchFilter",
"SearchResponse",
"Seller",
Expand Down
Loading
Loading