# Gazetkowo — 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 promotional products and current retailer leaflets from Polish stores to find the best deals and offers. Search for specific products, view store details, and discover the latest promotional flyers all in one place.

**Category:** E-commerce | **Website:** [gazetkowo.pl/](https://gazetkowo.pl/) | **Docs:** [parse.bot/marketplace/9307a22d-dd8f-44f3-b0f5-bf9acd4a27e7/gazetkowo-pl-api](https://parse.bot/marketplace/9307a22d-dd8f-44f3-b0f5-bf9acd4a27e7/gazetkowo-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-gazetkowo-pl-api-9307a22d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_latest_leaflets

List latest promotional leaflets across all stores with pagination. Returns leaflets ordered by recency with retailer and category info. Use retailer_category_id to filter by store category.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based) |
| `per_page` | integer | No | Number of results per page |
| `retailer_category_id` | string | No | Filter by retailer category UUID (from list_stores results[*].retailerCategoryId) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/get_latest_leaflets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","per_page":"<integer>","retailer_category_id":"<string>"}'
```

### get_leaflet_detail

Get full details of a specific leaflet including all page images. The order parameter corresponds to newspaperCurrentOrder from get_store_leaflets response. Returns the newspaper object with images array and product tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `order` | string | Yes | Newspaper current order number (newspaperCurrentOrder from get_store_leaflets response) |
| `retailer_slug` | string | Yes | Retailer slug from list_stores or search results (e.g. 'lidl', 'biedronka', 'kaufland') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/get_leaflet_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order":"<string>","retailer_slug":"<string>"}'
```

### get_product_detail

Get detailed information about a specific promotional product. Accepts the product slug from search results. Promotional products expire; expired products return a not-found error.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `retailer_id` | string | Yes | Retailer UUID from search_products results[*].retailer.id |
| `slug` | string | Yes | Product slug from search_products results[*].slug |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/get_product_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"retailer_id":"<string>","slug":"<string>"}'
```

### get_store_leaflets

Get all current leaflets/flyers for a specific store. Returns leaflets with cover images and page images. Each leaflet includes newspaperCurrentOrder which is needed to fetch leaflet detail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `retailer_id` | string | Yes | Retailer UUID from list_stores results[*].id |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/get_store_leaflets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"retailer_id":"<string>"}'
```

### list_stores

List all stores with active promotional offers. Returns retailer details including UUIDs, slugs, category IDs, and newspaper counts. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/list_stores \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_products

Full-text search over promotional products by keyword. Returns matching products with price, retailer, and validity dates. Client-side sort by price ascending is available. Pagination is not supported — the full result set is returned in one response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postcode` | string | No | Polish postal code for location scoping (format: XX-XXX) |
| `query` | string | Yes | Search keyword for promotional products (e.g. 'mleko', 'chleb', 'piwo') |
| `sort_by_price` | boolean | No | Sort results by price ascending |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gazetkowo-pl-api-9307a22d/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postcode":"<string>","query":"<string>","sort_by_price":"<boolean>"}'
```
