# Publix — 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.

> Access Publix grocery store data including product search, pricing, promotions, weekly ad deals, store locations, and category browsing.

**Category:** Food & Dining | **Website:** [publix.com/](https://publix.com/) | **Docs:** [parse.bot/marketplace/33e95d66-0f21-42d0-b457-9e5b205c8170/publix-com-api](https://parse.bot/marketplace/33e95d66-0f21-42d0-b457-9e5b205c8170/publix-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-publix-com-api-33e95d66/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_stores

Find Publix store locations by city, state, or zip code. Returns store details including address, hours, departments, services, latitude, longitude, and distance from search location.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | City name (e.g. 'Tampa'), 'city, state' (e.g. 'Atlanta, GA'), or 5-digit US zip code (e.g. '33134'). |

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

### get_all_categories

Retrieve the full category tree for the Publix store catalog. Returns a hierarchical structure of categories with ID, Name, DisplayName, and Children.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_number` | string | No | Publix store number. Defaults to '1425'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-publix-com-api-33e95d66/get_all_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store_number":"<string>"}'
```

### get_product_details

Retrieve full details for a single product including ingredients when available. Uses GraphQL search by item_code or product_id, then fetches the product HTML page for ingredient data. At least one of product_id or item_code is required. Pricing fields (priceLine, savingLine, onSale, promoMsg, promoTotalSavings) are scoped to the specified store_number.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_code` | string | No | Item code from search_products results (e.g. '70800'). |
| `product_id` | string | No | Product ID (baseProductId from search_products results, e.g. 'RIO-PCI-113569'). |
| `product_slug` | string | No | Product URL slug used in product page URL. Defaults to 'product' if omitted. |
| `store_number` | string | No | Publix store number for store-specific pricing. Defaults to '1425'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-publix-com-api-33e95d66/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_code":"<string>","product_id":"<string>","product_slug":"<string>","store_number":"<string>"}'
```

### get_sub_sandwich_deals

Find sub sandwich deals currently on sale at a Publix store. Searches for subs via GraphQL and filters to those currently on promotion. Returns pricing, savings, and promo details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `store_number` | string | No | Publix store number. Prices vary by store. Defaults to '1425'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-publix-com-api-33e95d66/get_sub_sandwich_deals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store_number":"<string>"}'
```

### get_suggestions

Get search suggestions and product typeahead results for a partial keyword. Returns both text completions and matching product previews with images.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Partial search keyword for suggestions (e.g. 'chick', 'org'). |
| `store_number` | string | No | Publix store number. Defaults to '1425'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-publix-com-api-33e95d66/get_suggestions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","store_number":"<string>"}'
```

### get_weekly_ad

Retrieve current weekly ad deals for a specific Publix store. Returns all active weekly ad promotions with savings, departments, brands, and validity dates. Set page_size to 0 for all deals.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number. |
| `page_size` | integer | No | Results per page. 0 returns all deals. |
| `store_number` | string | No | Publix store number. Defaults to '1425'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-publix-com-api-33e95d66/get_weekly_ad \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","page_size":"<integer>","store_number":"<string>"}'
```

### search_products

Full-text search over the Publix product catalog via GraphQL. Returns product listings with pricing, promotions, brand, taxonomy, and image URLs. Supports pagination via offset/limit. Results are store-specific when a store_number is provided.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results to return per request. |
| `offset` | integer | No | Number of results to skip for pagination. |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'organic bread'). |
| `store_number` | string | No | Publix store number for store-specific pricing. Defaults to '1425'. |

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