# Bug — 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 products from Bug.co.il, Israel's leading electronics retailer. Access product listings by keyword or category, retrieve detailed product information including specs, pricing, and images, and view featured homepage promotions — all through a single API.

**Category:** E-commerce | **Website:** [bug.co.il/](https://bug.co.il/) | **Docs:** [parse.bot/marketplace/27f32529-2f9b-4225-b7d3-a1175ac9c695/bug-co-il-api](https://parse.bot/marketplace/27f32529-2f9b-4225-b7d3-a1175ac9c695/bug-co-il-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-bug-co-il-api-27f32529/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_all_categories

Retrieve the complete list of product categories from the site navigation. Each category includes a display name and a slug suitable for passing to get_category_products. The category list reflects the site's current navigation structure.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bug-co-il-api-27f32529/get_all_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_category_products

List products within a specific category by slug. Returns a paginated list of products belonging to the given category. Category slugs are returned by get_all_categories. Paginates via integer page number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category slug as returned by get_all_categories (e.g. 'smartphones', 'smartwatches', 'computerscreens', 'gamingproducts'). |
| `page` | integer | No | Page number for pagination (1-indexed). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bug-co-il-api-27f32529/get_category_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","page":"<integer>"}'
```

### get_homepage_featured

Retrieve currently featured products and promotional banners from the homepage. Featured products are the store's highlighted deals; banners are the rotating promotional images with links to sale pages.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bug-co-il-api-27f32529/get_homepage_featured \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_details

Retrieve comprehensive details for a single product including full description, technical specifications, all product images, and current/original pricing. The product_url is obtained from the url field in search_products or get_category_products results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Full product URL as returned by search_products or get_category_products in the products[*].url field (e.g. 'https://www.bug.co.il/brand/hp/color/naturalsilver/laptop/15/fd0034nj/9w848ea'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bug-co-il-api-27f32529/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url":"<string>"}'
```

### search_products

Full-text search over the entire product catalog. Returns a paginated list of products matching the query keyword. Each product includes name, brand, pricing, URL, and thumbnail image. Paginates via integer page number; has_next indicates whether additional pages exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-indexed). |
| `query` | string | Yes | Search keyword to find products (e.g. 'laptop', 'smartphone', 'samsung') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bug-co-il-api-27f32529/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
