# X Kom — 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.

> Access product data from x-kom.pl, a major Polish electronics retailer. Search products by keyword or category, retrieve detailed product pages, customer reviews, Q&A, promotions, flash deals, and physical store locations.

**Category:** E-commerce | **Website:** [x-kom.pl/](https://x-kom.pl/) | **Docs:** [parse.bot/marketplace/e5e4a83f-abd9-4afd-b19b-d70e58e7751c/x-kom-pl-api](https://parse.bot/marketplace/e5e4a83f-abd9-4afd-b19b-d70e58e7751c/x-kom-pl-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-x-kom-pl-api-e5e4a83f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Get the full category tree organized by product groups. Each group contains its top-level categories with product counts. Use the returned group/category IDs with get_category_products to browse specific sections.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_products

Browse products within a specific category or product group. At least one of category_id or group_id should be provided. Returns the same paginated structure as search with product summaries, facets, and totals.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | No | Category ID to filter by (e.g. '159' for laptops, '1923' for monitor mounts). Obtain from get_categories endpoint. |
| `group_id` | string | No | Group ID to filter by (e.g. '2' for Laptopy i komputery, '4' for Smartfony) |
| `limit` | integer | No | Results per page (max 30) |
| `page` | integer | No | Page number for pagination (1-based) |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","group_id":"<string>","limit":"<integer>","page":"<integer>","sort":"<string>"}'
```

### get_deals

Get products currently on deal or sale from x-kom.pl. Combines items marked as Sale (Wyprzedaż/clearance) and Promotion into one paginated listing. Each item is enriched with computed DiscountAmount and DiscountPercentage fields derived from OldPrice, PromotionGainValue, or PromotionInfo. Returns the same paginated structure as search_products.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Results per page (max 30) |
| `page` | integer | No | Page number for pagination (1-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_hot_shot

Get the current daily flash deal (Gorący strzał). Returns the currently active limited-time promotion with discounted pricing, promotion countdown, and full product details. x-kom runs one hot shot per day with a limited quantity.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_hot_shot \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Retrieve full details for a single product by its ID. Includes photos, technical features/specifications, HTML description, availability per store, shipping costs, comment statistics, and alternative product variants. Returns stale_input with kind 'input_not_found' if the product ID does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID (numeric string, e.g. '593235'). Obtain from search_products or get_category_products Items[*].Id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_product_questions

Get paginated customer questions and answers for a specific product. Each question includes its author, body text, timestamp, and nested answers from other users or x-kom staff.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Questions per page |
| `page` | integer | No | Page number for pagination (1-based) |
| `product_id` | string | Yes | Product ID (numeric string, e.g. '593235'). Obtain from search_products Items[*].Id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_product_questions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","product_id":"<string>"}'
```

### get_product_reviews

Get paginated customer reviews for a specific product. Returns review items with ratings (1-6 scale and 1-5 scale), author names, review body text, timestamps, and vote counts. Also includes aggregate rating statistics.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Reviews per page |
| `page` | integer | No | Page number for pagination (1-based) |
| `product_id` | string | Yes | Product ID (numeric string, e.g. '593235'). Obtain from search_products Items[*].Id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","product_id":"<string>"}'
```

### get_promotions

Get products currently marked as promotions with pagination. Returns the same paginated structure as search with product summaries that have active promotional pricing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_promotions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_stores

Get all physical x-kom retail stores (salons) with addresses, opening hours, contact info, and geo-coordinates. Returns the full list in one page.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/get_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search over x-kom.pl product catalog. Returns paginated product listings matching the query keyword. Each result includes pricing, producer, category, ratings, and availability. Paginates via integer page counter; server-side ordering via the sort param.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Results per page (max 30) |
| `page` | integer | No | Page number for pagination (1-based) |
| `query` | string | Yes | Search keyword (e.g. 'laptop', 'mysz gamingowa') |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-x-kom-pl-api-e5e4a83f/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>","query":"<string>","sort":"<string>"}'
```
