blocket.se APIblocket.se ↗
Search and retrieve second-hand items, car listings, and rental housing data from Blocket.se and Qasa.se via 6 structured endpoints.
curl -X GET 'https://api.parse.bot/scraper/7e413c69-4d2e-404b-9a0e-2b3b4ab4d511/search_listings?query=iphone' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for second-hand items on Blocket Torget. Returns a paginated list of listings with title, price, location, and images.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination |
| sort | string | Sort order. Accepted values: RELEVANCE, PRICE_ASC, PRICE_DESC |
| queryrequired | string | Search keyword |
{
"type": "object",
"fields": {
"url": "string search URL used",
"total": "integer total number of results",
"listings": "array of listing objects with heading, price, location, canonical_url, ad_id, image_urls, and extras"
},
"sample": {
"data": {
"url": "https://www.blocket.se/recommerce/forsale/search?q=iphone&sort=RELEVANCE",
"total": 53,
"listings": [
{
"id": "22897240",
"type": "bap",
"ad_id": 22897240,
"brand": "Apple",
"price": {
"amount": 8000,
"price_unit": "kr",
"currency_code": "SEK"
},
"heading": "iPhone 16 pro 256gb svart",
"location": "Piteå",
"image_urls": [
"https://images.blocketcdn.se/dynamic/default/item/22897240/983575ed-35a5-42e6-8e4c-cbee4c0670d2"
],
"memory_size": "256 GB",
"canonical_url": "https://www.blocket.se/recommerce/forsale/item/22897240"
}
]
},
"status": "success"
}
}About the blocket.se API
The Blocket.se API covers 6 endpoints that expose listings, vehicle details, and rental housing counts from Sweden's largest second-hand marketplace and its associated platforms. The search_listings endpoint returns paginated results with price, location, images, and ad IDs; search_cars adds vehicle-specific fields like make, model, year, mileage, and fuel type; and detail endpoints surface full descriptions, schema.org data, and structured category hierarchies.
Search and Listing Data
The search_listings endpoint accepts a required query string and optional page and sort parameters (RELEVANCE, PRICE_ASC, PRICE_DESC). It returns the total result count, the resolved search URL, and an array of listing objects each containing heading, price, location, canonical_url, ad_id, image_urls, and an extras attribute array. The get_listing_detail endpoint takes that ad_id and returns the full seller description, an image array with uri, width, and height, postal coordinates, and a nested category object with parent category chains. Note that only fresh, active listings resolve — expired IDs return a not-found error.
Car and Vehicle Listings
search_cars targets Blocket Mobility and returns structured vehicle data per result: make, model, year, mileage, fuel, and price. When sorting by PRICE_ASC, leasing listings with low monthly amounts can appear before outright-purchase listings, so treat price values carefully in that sort order. get_car_listing_detail returns schema.org BreadcrumbList data and an advertising_facts object with key-value targeting pairs including fuel, year, price, mileage, make_text, model_text, body_type, and transmission.
Housing and Category Metadata
search_housing queries Qasa for rental listing counts in a given area using a location_identifier string with a country prefix, such as se/stockholms_kommun. It returns a homeSearch.documents.totalCount figure. Currently confirmed working for Swedish (se/) locations only. The get_categories endpoint returns the Blocket marketplace constraint rules as allowedCombinations and excludedCombinations arrays alongside a parameters list — useful for building valid category-and-trade-type filter combinations without trial-and-error.
- Monitor second-hand price trends for specific product queries using
search_listingssorted byPRICE_ASCorPRICE_DESC. - Build a used-car comparison tool pulling
make,model,year,mileage, andtransmissionfromget_car_listing_detail. - Track rental housing availability in Swedish municipalities by polling
search_housingwith differentlocation_identifiervalues. - Aggregate category hierarchies from
get_categoriesto populate valid filter options in a Swedish marketplace search UI. - Enrich a product database with seller descriptions, condition notes, and geo-coordinates from
get_listing_detail. - Alert on newly listed items matching a keyword by comparing total counts from repeated
search_listingscalls. - Extract schema.org structured data for car listings via
get_car_listing_detailto feed a structured data pipeline.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Blocket have an official public developer API?+
What does `get_car_listing_detail` return beyond what `search_cars` already provides?+
search_cars returns summary fields per result: make, model, year, mileage, fuel, and price. get_car_listing_detail adds an advertising_facts object with granular targeting data — including body_type and transmission — plus schema.org BreadcrumbList structured data, which search_cars does not include.Can I filter `search_listings` or `search_cars` by price range, category, or location?+
query, page, and sort as inputs. Price-range, category, and location filters are not exposed as parameters. The get_categories endpoint does return allowed category and trade-type combinations, but passing them as search filters is not currently supported. You can fork the API on Parse and revise it to add those filter parameters.Does `search_housing` work for locations outside Sweden?+
se/ prefix in the location_identifier field, for example se/göteborgs_kommun. Non-Swedish Qasa markets have not been validated. You can fork the API on Parse and revise it to test and add support for other country prefixes.What happens if I request details for a listing that has expired?+
get_listing_detail and get_car_listing_detail return a not-found error for expired or removed listings. Always source ad_id values from fresh search_listings or search_cars results to avoid stale IDs.