# Instacart — 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 for grocery products across multiple retailers, view store locations and availability, and access detailed product information including prices and descriptions. Find the best deals and nearest stores offering the items you need.

**Category:** Food & Dining | **Website:** [instacart.com/](https://instacart.com/) | **Docs:** [parse.bot/marketplace/b64496db-9614-4897-9c82-9901474a6e81/instacart-com-api](https://parse.bot/marketplace/b64496db-9614-4897-9c82-9901474a6e81/instacart-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-instacart-com-api-b64496db/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_product_details

Get detailed information for a specific product including description, nutritional info, and ratings. Uses the product page and GraphQL APIs to gather comprehensive product data. Requires a product_id from search_products results and the retailer_slug.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postal_code` | string | No | US postal/zip code for regional pricing and availability |
| `product_id` | string | Yes | Product ID from search_products results. Accepts numeric ID (e.g. '16902650') or full item ID (e.g. 'items_1944-16902650'). |
| `retailer_slug` | string | Yes | Retailer slug (e.g. 'costco', 'key-food') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-instacart-com-api-b64496db/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postal_code":"<string>","product_id":"<string>","retailer_slug":"<string>"}'
```

### get_store_details

Get details for a specific retailer including name, logo, categories, and estimated delivery time. Requires a retailer_slug from get_stores results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postal_code` | string | Yes | US postal/zip code |
| `retailer_slug` | string | Yes | Retailer slug from get_stores results (e.g. 'costco', 'key-food') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-instacart-com-api-b64496db/get_store_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"postal_code":"<string>","retailer_slug":"<string>"}'
```

### get_stores

Get available grocery stores and retailers for a specific US postal code. Returns a list of stores with their names, slugs, categories, and delivery/pickup availability. Use store slugs from the results to query other endpoints.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `postal_code` | string | Yes | US postal/zip code to search for stores (e.g. '10001', '07094', '90210'). Leading zeros are preserved. |

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

### search_products

Search for products within a specific retailer by keyword. Returns product listings with prices, availability, and ratings. Results are deduplicated by product_id. Requires a retailer_slug obtained from get_stores.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of products to return |
| `postal_code` | string | Yes | US postal/zip code for store availability |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'bread', 'organic eggs') |
| `retailer_slug` | string | Yes | Retailer slug from get_stores results (e.g. 'costco', 'key-food') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-instacart-com-api-b64496db/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","postal_code":"<string>","query":"<string>","retailer_slug":"<string>"}'
```
