{"openapi":"3.0.3","info":{"title":"Blocket API (ReefAPI)","version":"0.1.1","description":"Blocket API — Nordic second-hand classifieds (Blocket Sweden, FINN Norway, Tori Finland, DBA Denmark): search listings, read the full listing and browse categories, in local currency. No account, no browser. Call POST /blocket/v1/{action} with an x-api-key header; every response is the { ok, data, meta, error } envelope.","contact":{"name":"ReefAPI","url":"https://reefapi.com/blocket-api","email":"support@reefapi.com"},"license":{"name":"ReefAPI Terms","url":"https://reefapi.com/terms"},"termsOfService":"https://reefapi.com/terms"},"externalDocs":{"description":"Blocket API documentation","url":"https://reefapi.com/docs/blocket"},"servers":[{"url":"https://api.reefapi.com"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"blocket","description":"Blocket API — Nordic second-hand classifieds (Blocket Sweden, FINN Norway, Tori Finland, DBA Denmark): search listings, read the full listing and browse categories, in local currency. No account, no browser."}],"paths":{"/blocket/v1/search":{"post":{"operationId":"blocket_search","summary":"Search second-hand listings on Blocket (se), FINN (no), Tori (fi) or DBA (dk) by keyword, category or region: listing id, title, price in local currency (null for give-aways), free/give-away flag, mun","description":"Search second-hand listings on Blocket (se), FINN (no), Tori (fi) or DBA (dk) by keyword, category or region: listing id, title, price in local currency (null for give-aways), free/give-away flag, municipality, publication time, private or business seller, shipping and buy-now availability, brand, images and attributes, with the true total and category/region counts. Filter by price, condition, seller type, ad type, shipping and ads published today; sort by relevance, newest or price.","tags":["blocket"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","example":"cykel","description":"Keyword, in the site's language (cykel, sykkel, polkupyörä, cykel). Optional when `category` or `location` is given."},"country":{"type":"string","enum":["se","no","fi","dk"],"default":"se","example":"se","description":"Which Nordic marketplace: se = Blocket, no = FINN torget, fi = Tori, dk = DBA. Prices come back in that country's currency; listing ids belong to one site."},"category":{"type":"string","example":"0.69","description":"Category code from `categories` or a search's `category_facets` — 0.<id> (top level, e.g. 0.69 sport), 1.<id>.<id> (sub-category) or 2.<id>.<id>.<id> (leaf, e.g. 2.69.3963.257 bicycles). The codes are shared by all four sites; the names are localised."},"location":{"type":"string","example":"0.300001","description":"Region code from a search's `region_facets` (e.g. 0.300001 Stockholm on Blocket, 0.20003 Akershus on FINN). Region codes are per country."},"page":{"type":"integer","minimum":1,"maximum":50,"default":1,"description":"Result page, 1-50 (53 listings per page). The sites stop at page 50 whatever the total."},"sort":{"type":"string","enum":["relevance","newest","price_asc","price_desc"],"default":"relevance","description":"Order of results. Anything else is rejected (the sites silently fall back to relevance)."},"price_min":{"type":"integer","minimum":0,"description":"Lowest price, whole units of the country's currency."},"price_max":{"type":"integer","minimum":0,"description":"Highest price, whole units of the country's currency."},"condition":{"type":"string","enum":["new","like_new","good","fair","needs_repair"],"description":"Item condition, on the sites' shared five-step scale."},"seller_type":{"type":"string","enum":["private","business"],"description":"Only private sellers or only businesses."},"listing_type":{"type":"string","enum":["sell","give_away","wanted"],"description":"Kind of ad. Give-away ads have no price."},"shipping":{"type":"string","enum":["shipping","free_shipping"],"description":"Only ads that can be shipped through the site's own delivery service, or only free shipping."},"published_today":{"type":"boolean","description":"Only ads published today."},"max_rotations":{"type":"integer","minimum":1,"maximum":5,"default":3,"description":"Advanced: how many times to retry a difficult request (1-5)."}}},"example":{"query":"cykel","country":"se"}}}},"responses":{"200":{"description":"Result envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing or invalid x-api-key"},"429":{"description":"Rate limited or quota exhausted"}},"x-reefapi-credits":1}},"/blocket/v1/listing":{"post":{"operationId":"blocket_listing","summary":"The full listing by id or URL: title, full description, price and currency, give-away flag, status (active or sold), condition on the five-step scale, category path with its search code, all attribute","description":"The full listing by id or URL: title, full description, price and currency, give-away flag, status (active or sold), condition on the five-step scale, category path with its search code, all attributes (size, brand, model…), every image with dimensions, postal code, city and map position, last-edited time, shipping and buy-now availability, and the seller — for businesses the shop name, organisation id, company registry link, address, phone, website and their other listings; for private sellers the seller type and the site's seller id (the sites show no private seller name to logged-out visitors).","tags":["blocket"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listing_id":{"type":"string","example":"26612110","description":"Listing id (the number at the end of …/recommerce/forsale/item/26612110) or the full listing URL — a URL also sets the country."},"country":{"type":"string","enum":["se","no","fi","dk"],"default":"se","example":"se","description":"Which Nordic marketplace: se = Blocket, no = FINN torget, fi = Tori, dk = DBA. Prices come back in that country's currency; listing ids belong to one site."},"max_rotations":{"type":"integer","minimum":1,"maximum":5,"default":3,"description":"Advanced: how many times to retry a difficult request (1-5)."}},"required":["listing_id"]},"example":{"listing_id":"26612110"}}}},"responses":{"200":{"description":"Result envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing or invalid x-api-key"},"429":{"description":"Rate limited or quota exhausted"}},"x-reefapi-credits":1}},"/blocket/v1/categories":{"post":{"operationId":"blocket_categories","summary":"The marketplace category tree of one site with live listing counts — three levels, each node with the code to pass as `category` to search","description":"The marketplace category tree of one site with live listing counts — three levels, each node with the code to pass as `category` to search. Optionally counted for a keyword.","tags":["blocket"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"country":{"type":"string","enum":["se","no","fi","dk"],"default":"se","example":"se","description":"Which Nordic marketplace: se = Blocket, no = FINN torget, fi = Tori, dk = DBA. Prices come back in that country's currency; listing ids belong to one site."},"query":{"type":"string","example":"cykel","description":"Optional keyword: counts are then for that keyword."},"max_rotations":{"type":"integer","minimum":1,"maximum":5,"default":3,"description":"Advanced: how many times to retry a difficult request (1-5)."}}},"example":{"country":"se"}}}},"responses":{"200":{"description":"Result envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"401":{"description":"Missing or invalid x-api-key"},"429":{"description":"Rate limited or quota exhausted"}},"x-reefapi-credits":1}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Envelope":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"data":{"description":"Action result (shape varies per action)"},"meta":{"type":"object","description":"api, endpoint, mode, latency_ms, record_count, completeness_pct"},"error":{"type":"object","nullable":true,"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"}}}}}}}}