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 URL | https://market.hostbun.cc |
|---|---|
| Auth | None — public, read-only. |
| Format | JSON. All endpoints are GET. |
| CORS | Open — callable from the browser. |
| Errors | { "error": "…" } with HTTP 4xx/5xx. |
/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
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.
| Param | Type | Default | Description |
|---|---|---|---|
max_price | int | 4000 | Price ceiling (SEK). |
min_price | int | 200 | Price floor — skips 0-kr junk. |
models | csv | all | Families, e.g. android, iphone, pixel,galaxy. See aliases. |
min_storage | int | — | Minimum storage in GB, e.g. 128. |
buy_now | 0/1 | — | 1 = only directly buyable (“Köp nu”). |
ships | 0/1 | — | 1 = shippable (“Kan skickas”). |
free_ship | 0/1 | — | 1 = free shipping (“Gratis frakt”). |
condition | enum | any | new or used. |
region | string | — | Location contains, e.g. Stockholm. |
q | string | — | Free text in the title. |
sort | enum | price_asc | value (best model first) · price_asc · price_desc · newest. |
limit | int | 30 | 1–100. |
include_junk | 0/1 | 0 | 1 = don’t filter accessories/broken. |
Try it
best buyable Androids iPhone/Pixel 128GB ≤1500 buy-now + free shipping ≤800Response
{
"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
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.
| Param | Description |
|---|---|
q | Free text in title + description. |
vertical, section, leaf | Category tree by name. leaf accepts a comma list. |
brand, location | Comma lists (OR within, AND across params). |
cond | New / Used (comma list). |
trade | Säljes / Köpes / Bortskänkes. Wanted-ads (Köpes) are hidden by default; pass trade=Köpes or include_wanted=1 to include them. |
status | Bot verdict: viable / reject. |
company | 1 = Företag (retailer), 0 = Privat. |
ships, buynow, freeship | 1 = flag set (Kan skickas / Köp nu / Gratis frakt). |
sold, include_sold | sold=1 only sold; include_sold=1 include sold. |
pmin, pmax | Price range (SEK). |
has_image, has_desc, storage | Extra filters. |
sort | newest · price_asc · price_desc · favorites. |
page, size | Pagination (size 1–96, default 48). |
Try it
phones ≤500 kr Apple/Samsung from retailers sold listingsResponse
{ "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
Full record for one listing: description, all photos (image_urls), condition, seller, category breadcrumb, purchase flags, bot verdict.
Facets
Category tree (vertical → section → leaf), top brands and locations, conditions, statuses, price bounds — with counts. Drives the UI sidebar. Cached ~5 min.
/api/facetsModel aliases (models=)
| Alias | Matches |
|---|---|
android | All Android families (Galaxy, Pixel, OnePlus, Xperia, Nothing, Moto, Nokia, Xiaomi/Redmi/Poco, Huawei/Honor) — excludes iPhone. |
iphone / apple | iPhone. |
pixel, galaxy, samsung, oneplus, xperia, sony, nothing, motorola, nokia, xiaomi, huawei | That brand/family. Combine with commas: models=pixel,oneplus. |
Listing types
Every listing carries flags decoded from Blocket. The complete set:
| Field | Label | Meaning |
|---|---|---|
buy_now | Köp nu | Buy directly, pay in-app, ships with buyer protection. |
shipping_exists | Kan skickas | Protected shipping available. |
seller_pays_shipping | Gratis frakt | Seller pays freight. |
is_retailer | Företag / Privat | 1 = professional seller, else private. |
sold | Såld | Deal closed — not buyable (hidden by default). |
trade_type | Säljes / Köpes / Bortskänkes | For 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.