# Blocket — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse second-hand items, cars, and housing listings across Blocket.se and Qasa.se, then retrieve detailed information about any listing that interests you. Get instant access to comprehensive product details, pricing, and categorized inventory across multiple marketplaces in one unified interface.

**Category:** Marketplaces | **Website:** [blocket.se/](https://blocket.se/) | **Docs:** [parse.bot/marketplace/000b6f5b-b29b-4291-9f66-e94f60f9bf04/blocket-se-api](https://parse.bot/marketplace/000b6f5b-b29b-4291-9f66-e94f60f9bf04/blocket-se-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_car_listing_detail

Fetch full details of one car listing by its ad_id. Returns advertising targeting data (fuel, year, price, mileage, make, model, body type, transmission) and schema.org breadcrumb data. Use a fresh ad_id from search_cars; expired listings return input_not_found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | The unique car listing ID (ad_id field from search_cars results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/get_car_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### get_categories

Retrieve the category constraint rules for Blocket marketplace. Returns parameter combinations and allowed/excluded category-trade_type pairings used to validate listing submissions.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_dealer_detail

Fetch full contact details of a car dealer by their dealer_id (the org_id field from search_cars results). Returns name, phone, email, street address, and geo coordinates. Use a dealer_id from search_cars results with dealer_segment filter; non-existent IDs return input_not_found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dealer_id` | string | Yes | The dealer's unique organisation ID (org_id field from search_cars results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/get_dealer_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dealer_id":"<string>"}'
```

### get_dealer_listings

Fetch all car listings for a specific dealer by their dealer_id (org_id from search_dealers or search_cars results). Returns paginated car summaries with make, model, year, mileage, fuel, price, and canonical URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dealer_id` | string | Yes | The dealer's unique organisation ID (dealer_id from search_dealers or org_id from search_cars results) |
| `page` | integer | No | Page number for pagination |
| `sort` | string | No | Sort order for results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/get_dealer_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dealer_id":"<string>","page":"<integer>","sort":"<string>"}'
```

### get_listing_detail

Fetch full details of one second-hand item listing by its ad_id. Returns description, condition, images, category hierarchy, and location. Use a fresh ad_id from search_listings; expired listings return input_not_found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | The unique listing ID (ad_id field from search_listings results) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### search_cars

Full-text search over Blocket Mobility (cars). Returns paginated car listing summaries with make, model, year, mileage, fuel type, and price. When sorting by PRICE_ASC, leasing listings with low monthly amounts may appear first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search keyword |
| `sort` | string | No | Sort order for results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/search_cars \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","sort":"<string>"}'
```

### search_dealers

List car dealers on Blocket by browsing dealer car listings. Extracts unique dealers from one page of dealer-only search results. Each dealer includes their org_id (usable with get_dealer_detail for full contact info), name, and location. Optionally filter by a search keyword to find dealers selling specific makes/models.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination through dealer listings |
| `query` | string | No | Optional search keyword to filter dealers by car make/model they sell |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/search_dealers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

### search_housing

Query rental housing listing counts for a Swedish area via the Qasa GraphQL API. Returns the total count of available rental listings for the specified location identifier.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `location_identifier` | string | No | Qasa area identifier with country prefix, e.g. 'se/stockholms_kommun', 'se/göteborgs_kommun' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/search_housing \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"location_identifier":"<string>"}'
```

### search_listings

Full-text search over Blocket Torget (second-hand marketplace). Returns paginated listing summaries ordered by the chosen sort. Each result carries price, location, and image URLs. Paginate via page parameter; total count indicates available results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination |
| `query` | string | Yes | Search keyword |
| `sort` | string | No | Sort order for results |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-blocket-se-api-000b6f5b/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>","sort":"<string>"}'
```
