Search Blocket ads
Blocket (blocket.se) marketplace ads (or used cars with vertical=cars) for a keyword with category, location, radius around a point, price, condition, seller type, trade type, shipping, published today and sort, plus any other filter the site lists in filters (pass as filters=name:value). Each result has price (SEK), location and coordinates, published time, photos, labels and, for business sellers, the shop name; car results add make, model, year, mileage, fuel, transmission and dealer. Private sellers' names, phone numbers and email addresses are never returned (masked in ad text).
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
q | string | Keywords. Example: soffa |
vertical | marketplace | cars | marketplace (default) or cars. |
category | string | Category value(s) from filters (e.g. 0.93), comma-separated. |
location | string | Location value(s) from filters, comma-separated. |
lat | string | Latitude for a radius search (with lng). |
lng | string | Longitude (with lat). |
radius_km | string | Radius in km (default 10). |
price_min | string | Minimum price (SEK). |
price_max | string | Maximum price (SEK). |
condition | string | Condition 1 (new) .. 5, comma-separated. |
seller_type | private | business | private or business. |
trade_type | sale | giveaway | wanted | Ad type. |
shipping | string | true: only ads with shipping. |
published_today | string | true: only ads published today. |
filters | string | Any other site filter as name:value, comma-separated (names and values from filters). |
sort | relevance | newest | price_asc | price_desc | closest | Sort order. |
page | integer | Results page, 1 for the first. Pass back next_page; null on the last page. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/blocket/v1/search?q=soffa" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/blocket/v1/search",
params={"q": "soffa"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/blocket/v1/search");
url.searchParams.set("q", "soffa");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).