# SS.lv — 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.

> Browse real estate and spare parts listings from ss.lv, search by keywords, and view detailed information about specific listings. Get instant access to property and automotive parts data to find what you're looking for on one of Latvia's largest marketplaces.

**Category:** Marketplaces | **Website:** [ss.lv/](https://ss.lv/) | **Docs:** [parse.bot/marketplace/b73662be-6f8a-472e-bc5a-c458b10d627b/ss-lv-api](https://parse.bot/marketplace/b73662be-6f8a-472e-bc5a-c458b10d627b/ss-lv-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-ss-lv-api-b73662be/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Fetch full details of a single listing by its URL. Returns structured information including title, price, location, description text, and all listing attributes as key-value pairs. Works for any ss.lv listing URL from any category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the listing on ss.lv (e.g., 'https://www.ss.lv/msg/lv/real-estate/flats/riga/centre/hxinf.html') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ss-lv-api-b73662be/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_real_estate_listings

Fetch real estate listings from a specific leaf-level category path on ss.lv. The category must be a complete path down to a district or sub-category level (e.g., 'real-estate/flats/riga/centre'). Returns up to 30 listings per page with title, URL, price, and column attributes. Non-leaf paths may return empty results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category path without /lv/ prefix. Must be a leaf-level path including district (e.g., 'real-estate/flats/riga/centre', 'real-estate/flats/riga/purvciems', 'real-estate/houses-summer-residences/riga/centre'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ss-lv-api-b73662be/get_real_estate_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>"}'
```

### search_spare_parts

Search for spare parts and transport-related listings by keyword. Returns results from the transport/spare-parts category with optional price and region filtering. Client-side price filtering is applied after retrieval when price_max is specified.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `price_max` | integer | No | Maximum price filter in EUR. Listings with prices above this value are excluded from results. |
| `query` | string | Yes | Search keyword (e.g., 'brake', 'bmw', 'audi') |
| `region` | string | No | Region code for filtering. '0' means all regions. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ss-lv-api-b73662be/search_spare_parts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price_max":"<integer>","query":"<string>","region":"<string>"}'
```
