Skip to content

feat(gumtree): add Gumtree UK classifieds API (SCR-254) - #61

Merged
0xGhostCasper merged 1 commit into
mainfrom
scr-254-gumtree-api
Oct 11, 2026
Merged

0xGhostCasper merged 1 commit into
mainfrom
scr-254-gumtree-api

Conversation

@0xGhostCasper

Copy link
Copy Markdown
Member

Summary

Adds a typed client.gumtree namespace for the new ScrapeBadger Gumtree (gumtree.com, UK) API — 8 endpoints:

Method Endpoint
search(query=None, *, category="all", location="uk", distance, min_price, max_price, sort, seller_type, urgent_only, with_photos, filters, page) GET /v1/gumtree/search
search_filters(category="all", *, location="uk", query) GET /v1/gumtree/search/filters
get_listing(listing_id) GET /v1/gumtree/listings/{listing_id}
get_seller_listings(listing_id, *, page=1) GET /v1/gumtree/listings/{listing_id}/seller-listings
autocomplete(query) GET /v1/gumtree/autocomplete
location_autocomplete(query) GET /v1/gumtree/locations/autocomplete
list_locations(parent_id=None) GET /v1/gumtree/locations
list_categories(parent_id=None) GET /v1/gumtree/categories
  • Flat client (like redfin/baidu) — 8 endpoints don't warrant sub-clients.
  • Frozen pydantic models (extra="ignore") mirror the backend gumtree_scraper models field-for-field; exported top-level with a Gumtree prefix.
  • Tests route every endpoint through a mocked client and round-trip real API responses (tests/fixtures/gumtree_samples.json) asserting no key or value is dropped.
  • README API table row + CHANGELOG Unreleased entry. No version bump / release.

Verification

  • uv run --frozen ruff check src/ tests/ — pass
  • uv run --frozen ruff format --check src/ tests/ — pass
  • uv run --frozen mypy src/ — no issues (221 files)
  • uv run --frozen pytest --ignore=tests/e2e — 823 passed

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Typed `client.gumtree` namespace for the 8 /v1/gumtree endpoints: search,
search_filters, get_listing, get_seller_listings, autocomplete,
location_autocomplete, list_locations and list_categories. Frozen pydantic
models mirror the backend gumtree_scraper schema field-for-field; tests
round-trip real API responses so a dropped field fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGhostCasper
0xGhostCasper merged commit 6a4d47d into main Oct 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants