# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/bug/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/bug/get-all-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bug/get-category-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bug/get-homepage-featured \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bug/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bug/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.