Skip to content

Latest commit

 

History

History
110 lines (83 loc) · 3.07 KB

README.MD

File metadata and controls

110 lines (83 loc) · 3.07 KB

Ebay Kleinanzeigen API

Ebay Kleinanzeigen API

A powerful API interface for Ebay-Kleinanzeigen.de that enables you to fetch listings and specific data.

🚀 Looking for a ready-to-use solution?
Try it at kleinanzeigen-agent.de »
✓ Automated Search Agents
🔜 Hosted Scraper API (Coming Soon)
Report Bug · Request Feature

(back to top)

Getting Started

Want to skip the setup?

Visit kleinanzeigen-agent.de for our hosted solution with additional features and zero configuration required.

Prerequisites

  • Python 3.12 or higher
  • pip (Python package manager)
  • Playwright

Installation

  1. Clone the repository
git clone https://github.com/DanielWTE/ebay-kleinanzeigen-api.git
cd ebay-kleinanzeigen-api
  1. Install dependencies
pip install -r requirements.txt
playwright install chromium
  1. Start the API
uvicorn main:app --reload

The API will be available at http://localhost:8000

API Endpoints

1. Fetch Listings

Endpoint: GET /inserate

Description: Retrieves a list of listings based on search criteria.

Query Parameters:
  • query (string, optional): The search term (e.g., "fahrrad" to search for bicycles).
  • location (string, optional): The location or postal code to narrow the search (e.g., 10178 for Berlin).
  • radius (integer, optional): The search radius in kilometers from the specified location (e.g., 5 for a 5 km radius).
  • min_price (integer, optional): The minimum price in Euros for the listings (e.g., 200 for at least 200 Euros).
  • max_price (integer, optional): The maximum price in Euros for the listings (e.g., 500 for at most 500 Euros).
  • page_count (integer, optional): The number of pages to search or return (e.g., 5 for the first 5 pages, default is 1, max: 20 pages).
Example Request:
GET /inserate?query=fahrrad&location=10178&radius=5&min_price=200&page_count=5

2. Fetch Listing Details

Endpoint: GET /inserat/{id}

Description: Retrieves detailed information about a specific listing.

Path Parameters:
  • id (string): The unique identifier of the listing to fetch details for.
Example Request:
GET /inserat/12345

Documentation

API Response Format

All API endpoints return responses in the following JSON format:

{
  "success": true,
  "data": [
    ...
  ]
}

API documentation is available at http://localhost:8000/docs when running locally.

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)