API ← Till marknaden OpenAPI ↗

Marknad API

A read-only JSON API over a full mirror of Blocket's recommerce marketplace — ~600,000 listings across every category, refreshed continuously.

Overview

Base URLhttps://market.hostbun.cc
AuthNone — public, read-only.
FormatJSON. All endpoints are GET.
CORSOpen — callable from the browser.
Errors{ "error": "…" } with HTTP 4xx/5xx.
Two ways in: /api/find is the easy, opinionated phone finder (state requirements, get clean results). /api/listings is the raw faceted search over every listing and field.

Quick start

curl "https://market.hostbun.cc/api/find?models=iphone,pixel&max_price=1500&min_storage=128&buy_now=1&sort=value"

Phone finder

GET /api/find

Requirements in, clean buyable phones out. Automatically restricts to real phones (category Mobiltelefoner) and drops sold, wanted-ads (“köpes”), accessories, broken and locked listings.

ParamTypeDefaultDescription
max_priceint4000Price ceiling (SEK).
min_priceint200Price floor — skips 0-kr junk.
modelscsvallFamilies, e.g. android, iphone, pixel,galaxy. See aliases.
min_storageintMinimum storage in GB, e.g. 128.
buy_now0/11 = only directly buyable (“Köp nu”).
ships0/11 = shippable (“Kan skickas”).
free_ship0/11 = free shipping (“Gratis frakt”).
conditionenumanynew or used.
regionstringLocation contains, e.g. Stockholm.
qstringFree text in the title.
sortenumprice_ascvalue (best model first) · price_asc · price_desc · newest.
limitint301–100.
include_junk0/101 = don’t filter accessories/broken.

Try it

best buyable Androids iPhone/Pixel 128GB ≤1500 buy-now + free shipping ≤800

Response

{
  "criteria": { "max_price": 1500, "models": "iphone,pixel", "buy_now": true, "sort": "value", "junk_excluded": true, ... },
  "count": 30,
  "results": [
    { "ad_id": 24555049, "title": "Apple iPhone 12 mobil 128 GB svart", "price_sek": 749,
      "storage_size": "128 GB", "condition": "Used", "location": "Järfälla",
      "buy_now": 1, "ships": 1, "free_ship": 0, "is_retailer": 0, "tier": 80,
      "url": "https://www.blocket.se/recommerce/forsale/item/24555049",
      "image": "https://images.blocketcdn.se/…" }
  ]
}

Faceted search

GET /api/listings

Raw search over every listing and field — the same query the marketplace UI uses. Sold listings are hidden unless include_sold=1 or sold=1.

ParamDescription
qFree text in title + description.
vertical, section, leafCategory tree by name. leaf accepts a comma list.
brand, locationComma lists (OR within, AND across params).
condNew / Used (comma list).
tradeSäljes / Köpes / Bortskänkes. Wanted-ads (Köpes) are hidden by default; pass trade=Köpes or include_wanted=1 to include them.
statusBot verdict: viable / reject.
company1 = Företag (retailer), 0 = Privat.
ships, buynow, freeship1 = flag set (Kan skickas / Köp nu / Gratis frakt).
sold, include_soldsold=1 only sold; include_sold=1 include sold.
pmin, pmaxPrice range (SEK).
has_image, has_desc, storageExtra filters.
sortnewest · price_asc · price_desc · favorites.
page, sizePagination (size 1–96, default 48).

Try it

phones ≤500 kr Apple/Samsung from retailers sold listings

Response

{ "page": 1, "size": 48, "total": 478, "capped": false, "rows": [ { … card fields … } ] }
capped:true means the exact total exceeds 20,000 (counting is capped for speed) — the value shown is 20000.

Listing detail

GET /api/listing/{ad_id}

Full record for one listing: description, all photos (image_urls), condition, seller, category breadcrumb, purchase flags, bot verdict.

/api/listing/24555049

Facets

GET /api/facets

Category tree (vertical → section → leaf), top brands and locations, conditions, statuses, price bounds — with counts. Drives the UI sidebar. Cached ~5 min.

/api/facets

Model aliases (models=)

AliasMatches
androidAll Android families (Galaxy, Pixel, OnePlus, Xperia, Nothing, Moto, Nokia, Xiaomi/Redmi/Poco, Huawei/Honor) — excludes iPhone.
iphone / appleiPhone.
pixel, galaxy, samsung, oneplus, xperia, sony, nothing, motorola, nokia, xiaomi, huaweiThat brand/family. Combine with commas: models=pixel,oneplus.

Listing types

Every listing carries flags decoded from Blocket. The complete set:

FieldLabelMeaning
buy_nowKöp nuBuy directly, pay in-app, ships with buyer protection.
shipping_existsKan skickasProtected shipping available.
seller_pays_shippingGratis fraktSeller pays freight.
is_retailerFöretag / Privat1 = professional seller, else private.
soldSåldDeal closed — not buyable (hidden by default).
trade_typeSäljes / Köpes / BortskänkesFor sale / wanted / giveaway.

Card fields

ad_id, title, price_sek, price_unit, location, brand, image, item_condition (New/Used), trade_type, is_retailer, shipping_exists, seller_pays_shipping, buy_now, sold, favorite_count, match_status, leaf_name, first_seen_at, url. Detail adds description, image_urls, seller_name, full category, reject_reason.