Blocket APIblocket.se ↗
Search and retrieve second-hand items, cars, and rental housing listings from Blocket.se and Qasa.se. 9 endpoints covering prices, dealers, categories, and more.
What is the Blocket API?
The Blocket.se API exposes 9 endpoints for querying second-hand goods, car listings, rental housing counts, and dealer contact data from Blocket.se and Qasa.se. Use search_listings to run full-text searches over Blocket Torget with paginated results including price, location, and image URLs, or search_cars to find vehicles with make, model, year, mileage, fuel type, and transmission details. Detailed item and car records are retrievable by ad_id.
curl -X GET 'https://api.parse.bot/scraper/7e413c69-4d2e-404b-9a0e-2b3b4ab4d511/search_listings?page=1&sort=RELEVANCE&query=iPhone' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace blocket-se-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Blocket.se SDK — find dealers, get contact info, and browse their cars."""
from parse_apis.Blocket_se_API import Blocket, Sort, ListingNotFound
client = Blocket()
# Search for dealers selling Volvo
for dealer_summary in client.dealer_summaries.search(query="Volvo", limit=3):
print(dealer_summary.name, dealer_summary.location, dealer_summary.dealer_id)
# Get full contact details for the first dealer found
dealer_hit = client.dealer_summaries.search(query="BMW", limit=1).first()
if dealer_hit:
dealer = dealer_hit.details()
print(dealer.name, dealer.telephone, dealer.email)
print(dealer.address.street, dealer.address.locality)
# Browse this dealer's car listings
for car in dealer.listings.list(sort=Sort.PRICE_ASC, limit=3):
print(car.heading, car.make, car.model, car.year, car.mileage)
# Search cars directly
car = client.car_summaries.search(query="Tesla", limit=1).first()
if car:
try:
full = car.details()
print(full.advertising_facts)
except ListingNotFound as exc:
print(f"Listing gone: {exc.item_id}")
# Fetch a known dealer by ID
try:
known = client.dealers.get(dealer_id="626260")
print(known.name, known.telephone, known.coordinates.latitude)
except ListingNotFound as exc:
print(f"Dealer not found: {exc.item_id}")
print("exercised: dealer_summaries.search / details / dealers.get / dealer.listings.list / car_summaries.search / car.details")
Full-text search over Blocket Torget (second-hand marketplace). Returns paginated listing summaries ordered by the chosen sort. Each result carries price, location, and image URLs. Paginate via page parameter; total count indicates available results.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination |
| sort | string | Sort order for results |
| queryrequired | string | Search keyword |
{
"type": "object",
"fields": {
"url": "string search URL used",
"total": "integer total number of results",
"listings": "array of listing summary objects with heading, price, location, canonical_url, ad_id, image_urls, extras"
},
"sample": {
"data": {
"url": "https://www.blocket.se/recommerce/forsale/search?q=iPhone&sort=RELEVANCE",
"total": 53,
"listings": [
{
"ad_id": 23981787,
"brand": "Apple",
"price": {
"amount": 8800,
"price_unit": "kr",
"currency_code": "SEK"
},
"heading": "iPhone 16 PRO",
"location": "Borås",
"image_urls": [
"https://images.blocketcdn.se/dynamic/default/item/23981787/0979214d"
],
"trade_type": "Säljes",
"canonical_url": "https://www.blocket.se/recommerce/forsale/item/23981787"
}
]
},
"status": "success"
}
}About the Blocket API
Marketplace and Car Search
search_listings accepts a query string plus optional page and sort parameters, returning an array of listing summaries that include heading, price, location, canonical_url, ad_id, image_urls, and extras. The total field tells you how many results exist across all pages. search_cars works the same way for Blocket Mobility vehicles, adding fields like make, model, year, mileage, fuel, and transmission. Note that sorting by PRICE_ASC may surface leasing listings first because their monthly amounts are numerically low.
Listing Detail Endpoints
get_listing_detail takes an ad_id from search_listings and returns the full record: seller description, a category object with nested parent categories, an images array with dimensions, a location object with postal code and geo coordinates, and an extras array of typed attributes. get_car_listing_detail returns advertising_facts (targeting key-value pairs such as fuel, year, price, mileage, make_text, model_text, body_type, transmission) alongside schema_data containing schema.org BreadcrumbList structured data. Both endpoints return input_not_found for expired listings, so use fresh ad_id values from search results.
Dealers and Housing
search_dealers pages through dealer-only car listings and extracts unique dealers with dealer_id, name, and location. Pass a dealer_id to get_dealer_detail to retrieve full contact info — phone, email, street address, and lat/lng coordinates — or to get_dealer_listings to fetch that dealer's current inventory with the same fields as search_cars. search_housing queries Qasa rental listing counts by location_identifier (e.g. se/stockholms_kommun) and returns a total_count integer — it does not return individual listing records.
Categories
get_categories returns the constraint rules governing Blocket listing submissions: each rule object contains parameters, allowAll, allowedCombinations, and excludedCombinations. This is useful for validating or mapping category and trade-type pairings before submitting or filtering listings.
The Blocket API is a managed, monitored endpoint for blocket.se — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when blocket.se changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official blocket.se API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track price trends for specific second-hand goods by querying
search_listingsrepeatedly with a keyword and recording thepricefield over time. - Build a used-car comparison tool using
search_carsfiltered by make/model and enriched withget_car_listing_detailfor body type and transmission. - Aggregate dealer inventories across Sweden by combining
search_dealerswithget_dealer_listingsfor each returneddealer_id. - Display rental housing availability per Swedish municipality using
search_housingwith differentlocation_identifiervalues. - Enrich car listings with dealer contact details (phone, email, address) by chaining
search_carstoget_dealer_detailvia theorg_idfield. - Validate category and trade-type combinations for a listing submission workflow using the rules from
get_categories. - Build a second-hand item alert system that monitors
search_listingsresults and flags newad_idvalues matching a saved query.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Blocket have an official developer API?+
What does `search_housing` return, and can I get individual rental listing details?+
search_housing endpoint returns only a total_count integer representing the number of available rental listings for a given Qasa location identifier. It does not return individual listing records, addresses, prices, or tenant details. You can fork this API on Parse and revise it to add an endpoint that retrieves individual Qasa rental listing details.How do I retrieve full car details after a search, and what fields does `get_car_listing_detail` expose?+
get_car_listing_detail takes an ad_id from search_cars results and returns two objects: advertising_facts with targeting pairs (fuel, year, price, mileage, make_text, model_text, body_type, transmission) and schema_data with schema.org BreadcrumbList data. It does not include a seller description or free-text notes — those are available only on second-hand item listings via get_listing_detail.Are seller profiles or private-seller contact details available through this API?+
get_dealer_detail covers contact data for registered car dealers only (phone, email, address, coordinates). You can fork this API on Parse and revise it to attempt extracting any publicly visible contact fields on individual listing pages.What happens if I pass an old or expired `ad_id` to a detail endpoint?+
get_listing_detail and get_car_listing_detail return input_not_found when the listing has expired or been removed. Use ad_id values retrieved from a recent search_listings or search_cars call to avoid this. Blocket listings can expire quickly for popular categories, so freshness matters.