# Publix Scraper - $1.00 / 1000 Products (`scrapeunblocker/publix-scraper`) Actor

Scrape Publix for one store by number or ZIP: search results or product pages with this week's promotions (BOGO, sale and regular price), coupons, size, aisle, category, ingredients and directions. Prices only for items on promotion. $1.00 per 1000 products.

- **URL**: https://apify.com/scrapeunblocker/publix-scraper.md
- **Developed by:** [Scrapeunblocker](https://apify.com/scrapeunblocker) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 98.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Publix Scraper

Scrape **Publix** (publix.com) as clean JSON for **one store**, chosen by store number or ZIP code. Get **search results** or **product pages**: product id and item code, title, brand, **size**, **this week's promotion** (BOGO, sale price and the regular price it replaces, valid dates, savings), the **digital coupon** flag, **aisle**, category, image and link. Product pages add the description, **ingredients, allergens, directions**, badges and related products.

**Important:** publix.com publishes a price online only while an item is on promotion. For every other item `price` is null, at every store. For everyday prices on all items, use an Instacart scraper with the retailer `publix` (Publix's delivery prices, which are higher than in store).

### Features

- **Store-specific promotions** - give a store number or a ZIP code (nearest store); every item names its store.
- **Search mode** - 48 products per page, up to 480 per search term, from any page. A keyword Publix sends to a category (e.g. `milk`) returns that category.
- **Product mode** - one product per input (`products`: product id or product link) with ingredients and directions.
- **Many inputs per run** - search terms or products in parallel.

### Use cases

- **Weekly deal tracking** - every BOGO and sale price at a store, with the dates it runs.
- **Promotion comparison** - which stores and regions run which deals.
- **Assortment and shelf data** - what a store carries and in which aisle.
- **Product data** - sizes, ingredients, allergens and images for a catalogue.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `search` | `search` or `product`. |
| `queries` | array | `cereal` | Search terms (search mode). |
| `products` | array | - | Publix product ids (`RIO-PCI-103438`) or product links (product mode). |
| `storeId` | string | - | Publix store number, e.g. `1614`. |
| `zip` | string | - | US ZIP code: the nearest Publix store. Leave `storeId` and `zip` empty for a store in Lakeland, FL. |
| `maxResults` | integer | `48` | Products per search term (1-480). |
| `page` | integer | `1` | Results page to start from (48 products per page). |
| `concurrency` | integer | `3` | Inputs processed at the same time (1-5). |

#### Example input

```json
{
  "mode": "search",
  "storeId": "1614",
  "queries": ["cereal", "chicken breast"],
  "maxResults": 96
}
```

### Output

One dataset item per product, with the input it came from and its store. A search item on promotion:

```json
{
  "mode": "search",
  "input": "cereal",
  "store": {
    "storeId": "1614",
    "name": "3 Miami Central",
    "city": "Miami",
    "state": "FL",
    "zip": "33136"
  },
  "position": 1,
  "productId": "RIO-PCI-103365",
  "itemCode": 8647,
  "title": "Cheerios Honey Nut Cereal",
  "brand": "Cheerios",
  "size": "10.8 oz (306 g)",
  "url": "https://www.publix.com/pd/cheerios-honey-nut-cereal/RIO-PCI-103365",
  "image": "https://images.publixcdn.com/pct/images/products/5000/008647-600x600-A.jpg",
  "price": 5.44,
  "priceText": "$5.44",
  "unit": null,
  "wasPrice": null,
  "currency": "USD",
  "onSale": true,
  "promotion": {
    "type": "BOGO",
    "message": "Buy 1 Get 1 Free",
    "conditions": "of equal or lesser price",
    "validThrough": "Valid 10/29-11/4",
    "savings": 5.44
  },
  "hasCoupon": true,
  "soldByWeight": false,
  "aisle": "Aisle 2 - Cereal",
  "category": "Cereals and Granola",
  "categoryPath": [
    "Grocery",
    "Breakfast and Cereal",
    "Cereals and Granola"
  ],
  "storeId": "1614"
}
```

An item that is not on promotion has `price`, `priceText`, `currency` and `promotion` set to null.

A product-mode item adds the product page's details (text shortened):

```json
{
  "images": [
    "https://images.publixcdn.com/pct/images/products/5000/008655-600x600-A.jpg"
  ],
  "description": "Toasted whole grain oat cereal. No artificial flavors. Per 1-1/2 Cup Serving: 140 calories; 0.5 g sat fat (3% DV); 190 mg sodium (8% DV); 1 g added sugars (2% DV). Gluten free. American Heart Associat...",
  "ingredients": "Whole Grain Oats, Corn Starch, Sugar, Salt, Tripotassium Phosphate, Vitamin E (Mixed Tocopherols) Added To Preserve Freshness. Vitamins And Minerals: Calcium Carbonate, Iron And Zinc (Mineral Nutrient...",
  "directions": null,
  "allergens": null,
  "available": true,
  "categories": [
    "Grocery",
    "Breakfast and Cereal",
    "Cereals and Granola"
  ],
  "badges": [
    "Contains more nutrients you need, like fiber, and less you don't, like saturated fat, added sodium or added sugar, than similar products within this category.",
    "Product is made without specific preservatives, flavors, and colors; the products may contain colors from natural sources",
    "Gluten Free"
  ],
  "couponCount": 8,
  "smartLabelUrl": "http://smartlabel.generalmills.com/16000487727",
  "relatedProducts": [
    {
      "productId": "RIO-PCI-103435",
      "title": "Cheerios Cereal",
      "url": "https://www.publix.com/pd/cheerios-cereal/RIO-PCI-103435"
    }
  ]
}
```

Per search term, the `LISTINGS` record in the key-value store keeps the store, `totalResults`, `totalPages` and `redirectedTo` when Publix sent the search to a category.

### Pricing

**$1.00 per 1000 products** (pay per result). A search term or product that returns nothing (no match, an unknown product or store) is listed in the `ERRORS` record of the key-value store and is not charged.

### Notes

- Prices are Publix's in-store prices for the chosen store, published only for items on promotion; `wasPrice` is the regular price when Publix shows it.
- Items sold by weight carry `unit: "lb"` and `soldByWeight: true`.
- Publix serves its site only in the US; no Publix account is needed.

Powered by [ScrapeUnblocker](https://www.scrapeunblocker.com).

# Actor input Schema

## `mode` (type: `string`):

Search: the products Publix shows for each search term at the store (48 per page). Product: one product each, with description, ingredients, allergens, directions and related products.

## `queries` (type: `array`):

Used when What to scrape = Search. What to search, e.g. cereal, chicken breast, coffee. One per line.

## `products` (type: `array`):

Used when What to scrape = Product. Publix product ids (RIO-PCI-103438) or product links (https://www.publix.com/pd/cheerios-cereal-large-size/RIO-PCI-103438). One per line.

## `storeId` (type: `string`):

Optional Publix store number (e.g. 1614): promotions and aisles of that store. Every item names its store.

## `zip` (type: `string`):

Optional US ZIP code: the nearest Publix store. Leave Store number and ZIP empty for a store in Lakeland, FL.

## `maxResults` (type: `integer`):

Upper limit of products for each search term (1-480; Publix shows 48 per page).

## `page` (type: `integer`):

Search mode: the results page to start from (48 products per page).

## `concurrency` (type: `integer`):

How many search terms or products to process at the same time (1-5).

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "cereal"
  ],
  "storeId": "",
  "zip": "",
  "maxResults": 10,
  "page": 1,
  "concurrency": 3
}
```

# Actor output Schema

## `results` (type: `string`):

One item per product with the input it came from, its position and the store

## `listings` (type: `string`):

Per search term: the store, total results and pages read

## `errors` (type: `string`):

Inputs that returned no products (no match, unknown product or store, blocked), with the reason (not billed)

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "cereal"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeunblocker/publix-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "queries": ["cereal"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeunblocker/publix-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "cereal"
  ],
  "maxResults": 10
}' |
apify call scrapeunblocker/publix-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeunblocker/publix-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4gZd2nORldg07RtQt/builds/5bQJCTmakVXDMHsOx/openapi.json
