kleinanzeigen
Browse kleinanzeigen.de listings from Python, your terminal, or an AI assistant. Search by keyword, location, radius, and price, and fetch full ad details: price, seller, description, images, and status.
One package, three ways to use it:
| What it is | Use it for | |
|---|---|---|
| Async client | Kleinanzeigen, an asyncio Python library returning typed pydantic models |
Scripts, scrapers, alerts, data pipelines |
| CLI | The kleinanzeigen command, with tables, live progress, and --json output |
Quick searches and shell scripting |
| MCP server | The kleinanzeigen-mcp command, a stdio MCP server |
Letting Claude or other MCP clients search for you |
All three share the same core: kleinanzeigen.de's Android JSON API over HTTPX. No browser, Selenium, Playwright, or account needed.
Installation
Requires Python 3.14 or later.
As a library in your project:
uv add kleinanzeigen # or: pip install kleinanzeigen
As standalone kleinanzeigen and kleinanzeigen-mcp commands:
uv tool install kleinanzeigen # or: pipx install kleinanzeigen
Async client
async with Kleinanzeigen() as ka:
result = await ka.search(SearchParams(query="fahrrad", pages=2))
for listing in result.listings:
print(listing.title, listing.price, listing.url)
Kleinanzeigen returns frozen pydantic models (SearchResult,
ListingDetail) and supports per-page iteration and a caller-owned HTTP
session. See docs/library.md for the full API: methods,
SearchParams, options, and error handling.
CLI
# Keyword search, all pages by default
kleinanzeigen search -q 'fahrrad' -l 'Berlin' --radius 5
# Price range, first page only, as JSON
kleinanzeigen search -q 'iphone' --min-price 100 --max-price 500 --pages 1 --json
# Only listings published since a date
kleinanzeigen search -q 'sofa' -l 'Hamburg' --published-after 2026-11-01
# Full details for one ad, by ID or URL
kleinanzeigen get 123456789
| Command | Description |
|---|---|
search |
Keyword search. Options: -q/--query (required), -l/--location, --radius, --min-price, --max-price, --page, --pages (default 0 = all), --published-after, --json |
get URL_OR_ID |
Show price, location, seller, description, details, and image links. Exits with status 1 if the ad is gone |
Searches show a live progress spinner and a results table with clickable
titles in terminals that support links. With --json, the CLI prints the
same JSON shape as the MCP server and shows no progress
spinner, so output can go straight into jq.
Run kleinanzeigen --help or kleinanzeigen <command> --help to see every
option.
MCP server
kleinanzeigen-mcp gives MCP clients (Claude Desktop, Claude Code, Cursor,
and others) access to kleinanzeigen.de over the stdio transport. Once it is
connected, you can ask things like "find used road bikes under 400 EUR within
10 km of Leipzig posted this week".
After installing the commands (uv tool install kleinanzeigen), add the
server to your client config:
{
"mcpServers": {
"kleinanzeigen": {
"command": "kleinanzeigen-mcp"
}
}
}
Or run it with uvx, without installing it first:
{
"mcpServers": {
"kleinanzeigen": {
"command": "uvx",
"args": ["--from", "kleinanzeigen", "kleinanzeigen-mcp"]
}
}
}
Tools
| Tool | Description | Returns |
|---|---|---|
search |
Keyword search; query is required |
Search response |
get_listing |
Full details for one ad by URL or ID (url_or_id) |
ListingDetail, or {"error": "listing not found or removed"} |
Development
uv sync # set up .venv
uv run pytest # offline API mapping and CLI tests
pre-commit run -a # ruff lint and format
Run the CLI from the checkout:
uv run kleinanzeigen search -q 'fahrrad' --pages 1
The included .mcp.json registers a kleinanzeigen-dev server that runs
uv run kleinanzeigen-mcp. MCP clients that support project-level config can
load it straight from this checkout.
The CLI demo GIF in assets/ is recorded with vhs;
regenerate it with vhs assets/cli-demo.tape from the repo root.
Acknowledgements
Based on ebay-kleinanzeigen-api, adapted to work without a browser.
Metadata
Release files for kleinanzeigen 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kleinanzeigen-0.3.0.tar.gz | 64.8 kB | With provenance | Details for kleinanzeigen-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kleinanzeigen-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for kleinanzeigen-0.3.0-py3-none-any.whl |
Total release size: 85.3 kB
Release files / kleinanzeigen-0.3.0.tar.gz
| Download URL | kleinanzeigen-0.3.0.tar.gz |
|---|---|
| Size | 64.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aa3dfc193b2d3892cf2f6f956a47396dc28dd338668475f9a04d7549c3ae22f
|
|
BLAKE2b-256 checksum How to use checksums |
ebf61a6a70fdc7a31d634cf1289ee229d1e6cfa001eeaa4526bb0a8c65657dbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / kleinanzeigen-0.3.0-py3-none-any.whl
| Download URL | kleinanzeigen-0.3.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9774f692e9ab910aca486ce113debe6db9280bbb77bea00ac7abbebf9053dc7e
|
|
BLAKE2b-256 checksum How to use checksums |
bc6c147ad095945d4f360efbe6471f19b279edc65aeedeee6af881f4d89c62a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for kleinanzeigen 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kleinanzeigen-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.