# Kupujemprodajem — 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 retrieve detailed information about laptop listings, seller profiles, and product ads from kupujemprodajem.com by keyword or category. Access comprehensive ad details, seller history, and product catalogs to find exactly what you're looking for on the marketplace.

**Category:** Marketplaces | **Website:** [kupujemprodajem.com/](https://kupujemprodajem.com/) | **Docs:** [parse.bot/marketplace/ae8be788-afcf-4ad7-8279-69f995ccbd44/kupujemprodajem-com-api](https://parse.bot/marketplace/ae8be788-afcf-4ad7-8279-69f995ccbd44/kupujemprodajem-com-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-kupujemprodajem-com-api-ae8be788/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the category tree. When called without category_id, returns all top-level categories. When called with a top-level category_id, returns sub-groups within that category. Only top-level category IDs (from the no-argument call) return sub-groups; group/leaf IDs return empty results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | A top-level category ID to fetch its sub-groups (e.g. '969' for 'Alati i oruđa', '1221' for 'Kompjuteri \| Laptop i tablet'). If omitted, returns all top-level categories. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kupujemprodajem-com-api-ae8be788/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>"}'
```

### get_listing_detail

Retrieve full details for a specific listing by its ID. Includes description, full specifications, seller information, photo URLs, and ad metadata. The ad_id can be obtained from search results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `ad_id` | string | Yes | The unique numeric ID of the listing (e.g. '192719696'). Obtain from search_laptop_listings or search_listings_by_keyword results. |

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

### get_seller_ads

Retrieve all active listings for a specific seller. Some sellers may have disabled public listing visibility, in which case the upstream API returns an error. The user_id can be obtained from search results or listing details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `user_id` | string | Yes | The unique numeric ID of the user/seller (e.g. '651336'). Obtain from listing details or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kupujemprodajem-com-api-ae8be788/get_seller_ads \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","user_id":"<string>"}'
```

### get_seller_profile

Retrieve a seller's public profile information, including their name, location, ratings (positive/negative reviews), member since date, and active ad count.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `user_id` | string | Yes | The unique numeric ID of the user/seller (e.g. '651336'). Obtain from listing details or search results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kupujemprodajem-com-api-ae8be788/get_seller_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"<string>"}'
```

### search_laptop_listings

Search for laptop listings in the Laptops category (categoryId=1221, groupId=101). Returns paginated results with ad summaries including price, location, condition, and seller info. Sorted by date by default; pagination via page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `sort` | string | No | Sorting order for results. |

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

### search_listings_by_keyword

Perform a keyword search across the entire site or within a specific category. Returns paginated listing results matching the keywords. Supports up to 20000 results (667 pages of 30).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Optional top-level category ID to restrict the search (e.g. '1221' for Kompjuteri \| Laptop i tablet). Obtain from get_categories endpoint. |
| `keywords` | string | Yes | Search keywords (e.g. 'laptop', 'Dell laptop'). |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kupujemprodajem-com-api-ae8be788/search_listings_by_keyword \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","keywords":"<string>","page":"<integer>"}'
```
