# Heb Product Search Scraper (`stealth_mode/heb-product-search-scraper`) Actor

Scrape product listings from HEB.com with advanced search filters or direct URLs. Capture product names, prices, availability, categories, images, and 30+ fields per item — perfect for price monitoring, inventory analysis, and retail market research.

- **URL**: https://apify.com/stealth\_mode/heb-product-search-scraper.md
- **Developed by:** [Stealth mode](https://apify.com/stealth_mode) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## HEB Product Search Scraper: Extract Grocery Data Instantly

***

### What Is HEB.com?

H-E-B (Here Everything's Better) is one of the largest supermarket chains in the United States, operating hundreds of stores across Texas and Mexico. HEB.com is its e-commerce platform, offering grocery delivery and in-store pickup for thousands of products — from fresh meat and produce to packaged goods and household items.

Manually collecting product data from HEB's search results is tedious and impractical at scale. The **HEB Product Search Scraper** automates this process, extracting structured product records from search results or direct URLs in minutes.

***

### Overview

The **HEB Product Search Scraper** extracts detailed product information from HEB.com search pages and product listings. It supports two flexible scraping modes:

1. **URL-based scraping** — Paste direct HEB search URLs (with filters pre-applied)
2. **Search filter-based scraping** — Define keywords, price ranges, and sorting preferences

This scraper is ideal for:

- **Retail analysts** monitoring competitor pricing and assortment
- **Market researchers** studying grocery e-commerce trends
- **Price comparison platforms** building datasets for shopping aggregators
- **Inventory managers** tracking product availability across categories
- **Business intelligence teams** benchmarking product lineups and promotions

Key strengths include configurable item limits, flexible search and filter options, graceful handling of URL failures, and pagination support.

***

### Input Format

The scraper accepts a JSON configuration object with two modes:

#### Mode 1: Scrape by URLs

```json
{
  "urls": [
    "https://www.heb.com/search?filter=price%3A0%7C999&q=meat&sortBy=PRICE&sortDirection=ASC"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 200
}
```

| Field | Description |
|---|---|
| `urls` | Array of HEB.com search result URLs with pre-applied filters |
| `ignore_url_failures` | If `true`, continues scraping if some URLs fail |
| `max_items_per_url` | Maximum products to extract per URL (e.g., `200`) |

**Use this mode when:** You already have specific search URLs prepared with your desired filters applied.

#### Mode 2: Scrape by Search Filters

```json
{
  "keyword": "meat",
  "sort_by": "PRICE",
  "price_range": "0-999",
  "page": 1,
  "max_items_per_url": 200,
  "ignore_url_failures": true
}
```

| Field | Description | Options |
|---|---|---|
| `keyword` | Search term (e.g., "meat", "organic milk") | Any product keyword |
| `sort_by` | Sort order for results | `SCORE` (Best Match), `PRICE`, `PRODUCT_NAME` |
| `price_range` | Price filter in cents (e.g., "0-999" = $0–$9.99) | `0-999`, `1000-1999`, `2000-2999`, etc. up to `15000-15999` |
| `page` | Starting page number (1-based pagination) | Integer ≥ 1 |
| `max_items_per_url` | Maximum products per page | Integer |
| `ignore_url_failures` | Continue if pagination fails | `true` or `false` |

**Use this mode when:** You want to define search criteria and let the scraper generate URLs and paginate automatically.

> **Tip:** Price ranges are in cents. For example, `0-999` = $0–$9.99, and `2000-2999` = $20–$29.99.

***

### Output Format

**Sample output**

```json
{
  "id": "312964",
  "store_id": 92,
  "shopping_context": "EXPLORE_MY_STORE",
  "display_name": "Hill Country Fare Ground Beef, 73% Lean",
  "decoded_display_name": "Hill Country Fare Ground Beef, 73% Lean, 3 lb",
  "full_display_name": "Hill Country Fare Ground Beef, 73% Lean, 3 lb",
  "full_category_hierarchy": "Meat & seafood/Meat/Beef",
  "minimum_order_quantity": 1,
  "maximum_order_quantity": 20,
  "best_available": false,
  "on_ad": false,
  "is_new": false,
  "priced_by_weight": false,
  "show_coupon_flag": false,
  "in_assortment": true,
  "is_ebt_snap_product": true,
  "product_description": "Before your next backyard BBQ, pick up some Hill Country Fare ground beef. Great for making burgers, it has a 73% lean/27% fat ratio, which means all you can taste is rich beefy juiciness. You can also use some for other hamburger-based recipes, like meatloaf, meatballs, chili and more.<br><br>&bull; Ground beef<br>&bull; 73% lean/27% fat<br>&bull; Great for making juicy burgers and more",
  "product_location": {
    "location": "In Meat Market on the Right Wall",
    "__typename": "ProductLocation"
  },
  "past_purchase_info": null,
  "purchase_preference_list": null,
  "inventory": {
    "inventory_state": "IN_STOCK",
    "__typename": "Inventory"
  },
  "brand": {
    "name": "Hill Country Fare",
    "is_own_brand": true,
    "__typename": "Brand"
  },
  "product_category": {
    "id": "490023",
    "name": "Meat & seafood",
    "__typename": "ProductCategory"
  },
  "product_image_urls": [
    {
      "url": "https://images.heb.com/is/image/HEBGrocery/prd-small/000312964.jpg",
      "size": "SMALL",
      "__typename": "Image"
    },
    {
      "url": "https://images.heb.com/is/image/HEBGrocery/prd-medium/000312964.jpg",
      "size": "MEDIUM",
      "__typename": "Image"
    },
    {
      "url": "https://images.heb.com/is/image/HEBGrocery/prd-large/000312964.jpg",
      "size": "LARGE",
      "__typename": "Image"
    }
  ],
  "carousel_image_urls": [
    "https://images.heb.com/is/image/HEBGrocery/000312964-1",
    "https://images.heb.com/is/image/HEBGrocery/000312964-2"
  ],
  "product_page_url": null,
  "skus": null,
  "product_placement_context": null,
  "analytics_product_properties": {
    "is_cross_sell": false,
    "is_every_day_low_price": false,
    "is_limited_time_offer": false,
    "is_own_brand_upsell": false,
    "placement_strategy": null,
    "__typename": "AnalyticsProductProperties"
  },
  "availability": {
    "schedule": null,
    "unavailability_reasons": [],
    "__typename": "Availability"
  },
  "from_url": "https://www.heb.com/search?q=meat"
}
```

Each scraped product returns a comprehensive record with 30+ fields:

#### Product Identity & Display

| Field | Meaning |
|---|---|
| `ID` | Unique HEB product identifier |
| `Display Name` | Product name as shown on the listing page |
| `Decoded Display Name` | Clean, URL-decoded version of the product name |
| `Full Display Name` | Complete product name including size/variant |
| `SKUs` | Stock Keeping Unit(s) for inventory tracking |
| `Brand` | Manufacturer or distributor brand name |

#### Categorization & Location

| Field | Meaning |
|---|---|
| `Product Category` | Primary product category (e.g., "Meat & Seafood") |
| `Full Category Hierarchy` | Complete path from store section to sub-category |
| `Shopping Context` | Aisle or department context for in-store shopping |
| `Store ID` | HEB store identifier where item is available |
| `Product Location` | Physical location info for in-store pickup or delivery |

#### Pricing & Purchasing

| Field | Meaning |
|---|---|
| `Price` | Current retail price (extracted from product data) |
| `Price Range` | Min-max price if product has variants |
| `Priced By Weight` | Boolean flag: `true` if price varies by weight (e.g., deli meat) |
| `Minimum Order Quantity` | Lowest quantity allowed per purchase |
| `Maximum Order Quantity` | Highest quantity allowed per order |
| `Show Coupon Flag` | `true` if digital coupons are available |

#### Availability & Inventory

| Field | Meaning |
|---|---|
| `Availability` | Stock status (e.g., "In Stock", "Out of Stock", "Limited Availability") |
| `Best Available` | Boolean: `true` if item is a preferred/best-selling option |
| `In Assortment` | `true` if item is part of HEB's regular assortment |
| `Inventory` | Stock level or availability details |

#### Product Details & Descriptions

| Field | Meaning |
|---|---|
| `Product Description` | Full HTML product description and attributes |
| `Product Page URL` | Direct link to the product detail page on HEB.com |
| `Is New` | Boolean: `true` if this is a newly added product |
| `Is EBT SNAP Product` | `true` if eligible for SNAP/EBT payment |

#### Visual & Media Assets

| Field | Meaning |
|---|---|
| `Product Image URLs` | Array of product image URLs for e-commerce display |
| `Carousel Image URLs` | Additional carousel images from the listing |

#### Additional Metadata

| Field | Meaning |
|---|---|
| `On Ad` | `true` if product is featured in current promotions |
| `Past Purchase Info` | Customer purchase history flags |
| `Purchase Preference List` | Whether item is on a saved list or watch list |
| `Product Placement Context` | Merchandising context (e.g., promoted, featured) |
| `Analytics Product Properties` | Internal tracking attributes for HEB analytics |

***

### How to Use

#### Method 1: URL-Based Scraping

1. **Find search results** — Navigate to HEB.com and search for products. Apply filters (price, category, etc.) as needed.
2. **Copy the URL** — Once filters are set, copy the full URL from the address bar.
3. **Paste URLs** — Enter URLs in the `urls` array of your configuration.
4. **Set max items** — Choose `max_items_per_url` (e.g., `200` for full coverage).
5. **Run the scraper** — Start the run and monitor progress.

#### Method 2: Search Filter Scraping

1. **Define your search** — Choose a `keyword` (e.g., "meat", "organic milk").
2. **Apply filters** — Select `sort_by` option and `price_range` if desired.
3. **Set pagination** — Specify starting `page` and `max_items_per_url`.
4. **Enable error handling** — Set `ignore_url_failures: true` for continuous pagination.
5. **Run the scraper** — The scraper generates URLs automatically and paginates.

**Common tips:**

- Price ranges are in cents; check the `enumTitles` mapping for dollar equivalents.
- For bulk data collection, set `max_items_per_url` to `200` for maximum coverage per page.
- URL-based mode is faster for targeted scrapes; filter mode is ideal for exploratory research.

***

### Use Cases & Business Value

- **Price monitoring** — Track HEB product prices over time to detect promotions and trends
- **Competitor intelligence** — Monitor what products HEB stocks versus other retailers
- **Assortment analysis** — Understand which brands and categories HEB emphasizes
- **Inventory insights** — Correlate product availability with demand signals
- **Shopping aggregators** — Feed HEB product data into price comparison platforms
- **Academic research** — Study retail pricing strategies and product placement

The HEB Product Search Scraper eliminates hours of manual data collection, delivering machine-readable product records that integrate directly into spreadsheets, databases, or data science workflows.

***

### Conclusion

The **HEB Product Search Scraper** is a powerful solution for anyone needing structured grocery product data from one of the largest US supermarket chains. Whether you choose URL-based or filter-based scraping, you'll unlock 30+ fields of actionable product intelligence — from pricing and availability to images and category hierarchies. Start a run today and transform HEB's product catalog into insights.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the product search list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## `keyword` (type: `string`):

Enter the keyword to search for items

## `sort_by` (type: `string`):

Sort items by options

## `price_range` (type: `string`):

Price range to filter by

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

Specify the page number to start scraping from

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.heb.com/search?q=meat"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
```

# Actor output Schema

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

No description

# 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 = {
    "urls": [
        "https://www.heb.com/search?q=meat"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("stealth_mode/heb-product-search-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 = {
    "urls": ["https://www.heb.com/search?q=meat"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("stealth_mode/heb-product-search-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 '{
  "urls": [
    "https://www.heb.com/search?q=meat"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}' |
apify call stealth_mode/heb-product-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stealth_mode/heb-product-search-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/AVIewxHDfs7DWwXDH/builds/wAL5z3U421dYQF7HN/openapi.json
