Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leonardcser/auto24-api
Python API wrapper for AutoScout24.ch
https://github.com/leonardcser/auto24-api
python selenium
Last synced: about 2 months ago
JSON representation
Python API wrapper for AutoScout24.ch
- Host: GitHub
- URL: https://github.com/leonardcser/auto24-api
- Owner: leonardcser
- License: mit
- Created: 2022-08-08T17:01:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-10T13:03:58.000Z (over 1 year ago)
- Last Synced: 2024-04-20T00:48:31.161Z (10 months ago)
- Topics: python, selenium
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoScout24 Public API
- [AutoScout24 Public API](#autoscout24-public-api)
- [About](#about)
- [Disclaimer](#disclaimer)
- [Installation](#installation)
- [Getting Started](#getting-started)
- [Search Listings](#search-listings)
- [Listing Details](#listing-details)
- [Examples](#examples)## About
A Public API wrapper written in Python for [www.AutoScout24.ch](https://www.autoscout24.ch/fr) (Swiss car listing website).
This project is still very new, and a lot is missing. (docs, tests, api integrations)
### Disclaimer
This project is a learning experiment and you are fully responsible for its use.
## Installation
```python
pip install git+https://github.com/leonardcser/auto24-api
```## Getting Started
```python
from auto24_api import Auto24API
```The `Auto24API()` class initializes a chrome driver instance. The context manager allows to automatically quit the driver. However, if the `Auto24API()` class needs to be called many times, it is recommended to manually create and dispose the driver with `Auto24API().close()`.
### Search Listings
```python
from auto24_api.search import Filters, SearchQuerywith Auto24API() as api:
res = api.search_listings(
SearchQuery(
make=[Filters.MAKE.AUDI, Filters.MAKE.BMW, Filters.MAKE.VW],
year_from=2014,
year_to=None,
km_from=None,
km_to=60_000,
price_from=7_500,
price_to=20_000,
hp_from=180,
sorting=Filters.SORTING.HP_DESC,
page_size=60,
)
)```
### Listing Details
```python
from auto24_api.details import DetailsQuerywith Auto24API() as api:
res = api.listing_details(DetailsQuery(_id=123456, slug="some-car-slug"))```
### Examples
Check out implementation examples [here](./examples/).