# 2ememain — 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 listings on 2ememain.be, view detailed product information and seller profiles, and explore what items specific sellers have available. Filter by category, price, condition, and location to find listings across the marketplace — all with full seller details in one place.

**Category:** Marketplaces | **Website:** [2ememain.be/](https://2ememain.be/) | **Docs:** [parse.bot/marketplace/6312335d-0beb-47e9-9d94-4679a3469842/2ememain-be-api](https://parse.bot/marketplace/6312335d-0beb-47e9-9d94-4679a3469842/2ememain-be-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/2ememain/`
**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 categories

Get available instrument category IDs for the 2ememain.be marketplace. The returned categories can be used with the category parameter in search_listings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/2ememain/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get listing detail

Get detailed information for a specific listing by its ID. Returns listing data from the search API enriched with schema.org Product structured data from the listing page when available. The item_id is obtained from search_listings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | Yes | Listing item ID (e.g. m2409165912), obtained from search_listings results' itemId field |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/2ememain/get-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"item_id":"<string>"}'
```

### Get seller listings

Get all active listings for a specific seller. Returns paginated listing results. Pagination advances via offset. The seller_id is obtained from listing data (sellerInformation.sellerId).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results to return |
| `offset` | integer | No | Pagination offset (number of items to skip) |
| `seller_id` | string | Yes | Numeric seller ID, obtained from sellerInformation.sellerId in listing data |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/2ememain/get-seller-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","seller_id":"<string>"}'
```

### Get seller profile

Get profile information for a specific seller including verification status, payment methods, and review scores. The seller_id is obtained from listing data (sellerInformation.sellerId).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `seller_id` | string | Yes | Numeric seller ID, obtained from sellerInformation.sellerId in listing data |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/2ememain/get-seller-profile \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"seller_id":"<string>"}'
```

### Search listings

Search for listings on 2ememain.be with keywords, categories, and filters. Returns paginated results. Pagination advances via offset (items, not pages). Each listing carries seller info, price, location, and category. The category tree is rooted at instruments (728); sub-categories narrow the search.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category name (acoustic, electric, bass, amps, all_instruments) or numeric category ID. Use get_categories to retrieve available category IDs. |
| `condition` | string | No | Item condition filter |
| `distance` | integer | No | Distance in km from postcode (0 means no distance filter) |
| `limit` | integer | No | Max results per page |
| `offset` | integer | No | Pagination offset (number of items to skip) |
| `postcode` | string | No | Belgian postal code for location-based search |
| `price_max` | integer | No | Maximum price in euros |
| `price_min` | integer | No | Minimum price in euros |
| `query` | string | No | Search keyword |
| `sort_by` | string | No | Sort field |
| `sort_order` | string | No | Sort order |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/2ememain/search-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","condition":"<string>","distance":"<integer>","limit":"<integer>","offset":"<integer>","postcode":"<string>","price_max":"<integer>","price_min":"<integer>","query":"<string>","sort_by":"<string>","sort_order":"<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.