Skip to main content

A python API wrapper for blocket.se

Project description

BlocketAPI

PyPI version License Python PyPI - Downloads

BlocketAPI allows users to search blocket.se for ads.

Blocket is one of Sweden's largest online marketplaces. It was founded in 1996 and allows users to buy and sell a wide range of items, including cars, real estate, jobs, services, and second-hand goods. The platform is known for its extensive reach and user-friendly interface, making it a popular choice for Swedes looking to purchase or sell items quickly and efficiently.

[!NOTE]
Blocket recently released a new version of their site which caused this package to break. But do not fear, we are actively working to try and restore all functionality. More info in issue #43.

🧑‍💻️ Install

Install BlocketAPI via PyPI...

pip install blocket-api

or use blocket-api.se without installing anything!

💁‍♀️ Usage

from blocket_api import (
    BlocketAPI,
    Category,
    CarColor,
    CarModel,
    CarSortOrder,
    CarTransmission,
    Location,
)

api = BlocketAPI()

# will search all of blocket
result = api.search(
    "Vinterdäck Audi",
    sort_order=SortOrder.PRICE_ASC,
    locations=[Location.STOCKHOLM, Location.UPPSALA],
    category=Category.FORDONSTILLBEHOR,
)

# search for cars only
result = api.search_car(
    "Audi", # query is optional
    sort_order=CarSortOrder.MILEAGE_ASC,
    models=[CarModel.AUDI],
    colors=[CarColor.GULD],
    price_from=10000,
    price_to=50000,
    transmission=CarTransmission.MANUAL,
    locations=[Location.STOCKHOLM],
)

📝 Notes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blocket_api-0.3.91.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blocket_api-0.3.91-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file blocket_api-0.3.91.tar.gz.

File metadata

  • Download URL: blocket_api-0.3.91.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for blocket_api-0.3.91.tar.gz
Algorithm Hash digest
SHA256 5468db75f74cca02b234e4fe2fd18facc1c49da3d1ad677e7b478eed53b8a998
MD5 085206c4ef5f6999cc1bbc3f419d7a16
BLAKE2b-256 6606124dec3922a5bb5fd2f1a6e94f318e7be22af1d834210e571c4070613b63

See more details on using hashes here.

File details

Details for the file blocket_api-0.3.91-py3-none-any.whl.

File metadata

  • Download URL: blocket_api-0.3.91-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for blocket_api-0.3.91-py3-none-any.whl
Algorithm Hash digest
SHA256 d3fce13da5761db1e773c17067f072decedbb598c7f785e2e12d277ed62d4892
MD5 9f7f4b0685fdf5b9f7c7c0b8f265c3f1
BLAKE2b-256 2189f0d69ce25da6c06f4552b1f484598fe64a8535bed43d33285d1007100088

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page