# Swappa — 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 used electronics on Swappa to find detailed listings with pricing data, seller profiles, and product reviews. Compare market prices and make informed buying decisions across thousands of secondhand device listings.

**Category:** Marketplaces | **Website:** [swappa.com/](https://swappa.com/) | **Docs:** [parse.bot/marketplace/e98dec75-9771-4ab0-afe7-6df3eec2714f/swappa-com-api](https://parse.bot/marketplace/e98dec75-9771-4ab0-afe7-6df3eec2714f/swappa-com-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-swappa-com-api-e98dec75/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_listing_detail

Get full details for a single listing by its ID. Returns structured product data from JSON-LD including price, condition, seller information, and aggregate ratings. The json_ld.offers.price field is the most reliable price source.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `listing_id` | string | Yes | Listing ID from get_product_listings results (e.g. 'LAGA33416'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"listing_id":"<string>"}'
```

### get_market_prices_overview

Get market pricing overview for top products on Swappa. Returns ranked tables of best-selling and most-listed products with listing counts and average prices. No parameters required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/get_market_prices_overview \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_product_listings

Get active listings for a specific product model with optional filters and pagination. Use a product_slug from search_listings results. Returns individual for-sale listings with prices, carriers, and listing IDs for use with get_listing_detail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `carrier` | string | No | Filter by carrier (e.g. 'unlocked', 'att', 'verizon', 'tmobile'). |
| `color` | string | No | Filter by color. |
| `condition` | string | No | Filter by condition (e.g. 'mint', 'good', 'fair'). |
| `page` | integer | No | Page number for pagination. |
| `product_slug` | string | Yes | Product slug from search_listings results (e.g. 'apple-iphone-15'). |
| `sort` | string | No | Sort order for results. |
| `storage` | string | No | Filter by storage capacity (e.g. '128gb', '256gb'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/get_product_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"<string>","color":"<string>","condition":"<string>","page":"<integer>","product_slug":"<string>","sort":"<string>","storage":"<string>"}'
```

### get_product_reviews

Get reviews for a product model. Returns an array of user reviews which may be empty for newer or less-reviewed products. Each review includes author name, text, numeric rating, and ISO date.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `count` | integer | No | Number of reviews to fetch. |
| `product_slug` | string | Yes | Product slug from search_listings results (e.g. 'apple-iphone-15'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/get_product_reviews \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"count":"<integer>","product_slug":"<string>"}'
```

### get_seller_profile

Get seller profile information and their active listings on Swappa. Returns seller stats (sold/bought/active counts), rating, location, badges, and current active listings with prices and conditions.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | Seller username (e.g. 'sellworld', 'jp-products-llc'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/get_seller_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"<string>"}'
```

### search_listings

Search for product models on Swappa by keyword. Returns matching products with starting prices and slugs that identify the product for use with get_product_listings and get_product_reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword (e.g. 'iphone 15', 'samsung galaxy s25'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-swappa-com-api-e98dec75/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
