# Weekly Ads Scraper: Store Flyers & Grocery Deals by ZIP (`moggedhq/weekly-ads-scraper`) Actor

Get this week's ads for Walmart, Target, CVS, Kroger, Safeway and hundreds more US and Canadian stores by ZIP or postal code: grocery deals and flyer items with sale price, regular price, deal text and dates. About $0.002 per ad item: 100 items cost $0.20. No login required.

- **URL**: https://apify.com/moggedhq/weekly-ads-scraper.md
- **Developed by:** [mogged](https://apify.com/moggedhq) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 ad items

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?

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

## Weekly Ads Scraper: Store Flyers & Grocery Deals by ZIP

For price analysts, brands, coupon publishers and comparison services collecting advertised offers across US and Canadian retailers. Supply ZIP or postal codes and retailer names to get current flyer items with prices, printed conditions, brand, images and validity dates. About **$0.002 per ad item**: 100 items cost **$0.20**, plus the minimum **$0.00005 start charge**. No retailer login or retailer API key is required.

Browse entire current flyers or keep item names containing words such as coffee, eggs or chicken. Collect grocery, pharmacy, hardware, electronics, pet and general merchandise offers in the same schema. The regional feed includes Walmart, Target, CVS, Kroger, Safeway, No Frills, Loblaws, Metro, Canadian Tire and many other participating retailers. The source is Flipp's public regional flyer service.

### What you get

Each delivered row represents one named ad item in one flyer. It includes the full item detail rather than only the flyer's abbreviated listing. Printed multi-buy, card and coupon conditions stay beside the advertised amount. Every row begins with a readable verdict, followed by retail-family fields and flyer-specific fields.

| Field | Meaning |
| --- | --- |
| `retailer`, `merchantId` | Publisher's retailer name and merchant identifier. |
| `flyerId`, `flyerName` | Circular identifier and published name. |
| `itemId`, `productId` | Ad entry ID and its `flyer:` compatibility ID. |
| `title`, `brand` | Published item title and explicit brand, including combined varieties. |
| `price`, `regularPrice` | Advertised numeric amount and source original amount when supplied. |
| `priceText` | Structured price label combining source pre-price and post-price text with the currency-formatted amount. |
| `prePriceText`, `postPriceText`, `rawPrice` | Individual source strings for faithful downstream formatting. |
| `saleStory`, `promoText` | Sale message and combined purchase conditions. |
| `validFrom`, `validTo` | Item validity timestamps with the supplied timezone offsets. |
| `flyerValidFrom`, `flyerValidTo` | Parent circular dates, kept separately from item dates. |
| `postalCode`, `location` | Postal code or Canadian postal-area prefix resolved by Flipp. |
| `requestedPostalCode`, `resolvedPostalCode` | Buyer request kept separate from the source resolution. |
| `resolvedCity`, `resolvedRegion`, `resolvedCountry` | Geography reported by Flipp's separate location service. |
| `geographyStatus`, `geographySourceUrl` | Source resolution and its first-party lookup URL; not postal-authority validation. |
| `feedPostalCode`, `feedLocale` | Per-flyer metadata checked against that resolution. |
| `country`, `currency` | US/USD or CA/CAD, selected from the input code. |
| `unitPrice`, `unitOfMeasure` | Printed price per weight or volume unit when explicit. |
| `advertisedQuantity`, `priceBasis` | Explicit multi-buy quantity and explanation of the amount. |
| `memberPrice`, `priceRequiresMembership` | Advertised amount and true flag when structured price text explicitly requires membership. |
| `description`, `disclaimer`, `flyerDisclaimer` | Supplied descriptive text and restrictions. |
| `category`, `flyerCategories` | Explicit item category and separate parent flyer classifications. |
| `imageUrl`, `url`, `flyerUrl` | Published item cutout and public item/circular links. |
| `retailerProductUrl`, `sku` | Retailer link and SKU when the detail explicitly supplies them. |
| `scrapedAt`, `sourceUrl` | UTC observation time and public source provenance. |

The common retail schema also includes `storeId`, `storeName`, `gtin`, `size`, `inStock`, `stockLevel`, `rating` and `reviewCount`. These remain null for this regional flyer source. `storePriceVerified` is false and `priceScope` is `regional-weekly-ad`. `promoStart` and `promoEnd` mirror the ad item's validity. `offers` preserves conditions for consumers of the retail family schema.

### Read the amount with its conditions

A two-for-five offer keeps the numeric bundle total as `price: 5` and an explicit `advertisedQuantity: 2`. It is not divided into an invented single-item price. An amount printed per pound can populate `unitPrice` and `unitOfMeasure`; a multi-buy does not become a per-weight amount. An explicitly printed alternative such as "or $2.89 ea." supplies that separate EA unit price. Currency stays in its own field, so Canadian and US dollar amounts can be separated before comparison.

`regularPrice` comes only from the source's original-price field. Savings language, non-member disclaimer amounts and crossed-out numbers inside an image do not become inferred regular prices. `onSale` compares original and advertised amounts only when both exist. Missing or non-numeric prices remain null, and named BOGO or percentage offers can still be useful ad observations.

Card and digital-coupon wording is retained when supplied in structured text. Coupons are not clipped or subtracted from the amount. A null membership flag means the structured source did not establish a requirement. Keep the full conditions when showing a price to a shopper or comparing promotions across brands.

### Start in three steps

1. Enter at least one complete US ZIP or Canadian postal code.
2. Choose retailers or leave that list empty to browse all participating retailers. Add optional item-name terms and flyer categories.
3. Set the per-flyer and global caps, start the run, and inspect SUMMARY before exporting the dataset.

The prefill asks for coffee at CVS and Target near 10001 with a maximum of 20 items. In a cloud test on 4 November 2026 it delivered **12 current offers from two retailers and two flyers**, with **12 matching item charges**, in **53.235 seconds**. It returned no source failures. Counts change as new circulars replace old ones. A broad US test delivered 1,050 distinct items across 72 retailers and two regions, with no source failures. Numeric prices were supplied for 755 items, original prices for 19 and brands for 628. Flyer categories were available; item categories were empty in that sample.

Two separate cloud jobs each delivered 1,050 distinct ad items without source failures. A real reboot recovered 20 unique rows with exactly 20 charges.

### Inputs

| Input | Behavior |
| --- | --- |
| `postalCodes` | Array of full US ZIPs or Canadian postal codes. Spaces in Canadian codes are removed; ZIP+4 is trimmed. |
| `retailers` | Names with case and punctuation ignored. CVS matches CVS Pharmacy. Empty includes all current retailers. |
| `searchTerms` | Keep titles containing any term. Empty or `*` keeps all named entries. |
| `categories` | Parent flyer categories such as Groceries, Pharmacy, Home & Garden, Pets or Electronics. Empty includes all. |
| `includeFlyerPages` | Save free FLYERS metadata with page IDs, page numbers, coordinates and dimensions. |
| `maxItemsPerFlyer` | Maximum distinct matching items from each flyer across the run; default 20. |
| `maxItems` | Global distinct item cap across all requested regions; default 20. |
| `proxyConfiguration` | Optional Apify Proxy settings. Direct HTTP by default, with datacenter and country-matched residential fallback on refusals. |

```json
{
  "postalCodes": ["10001", "M5V 2T6"],
  "retailers": ["CVS", "Target", "No Frills", "Loblaws"],
  "searchTerms": ["coffee", "eggs"],
  "maxItemsPerFlyer": 20,
  "maxItems": 80,
  "includeFlyerPages": true
}
```

For a broad grocery snapshot, use empty retailers and searchTerms with `categories: ["Groceries"]`. To monitor a complete selected circular, raise maxItemsPerFlyer and maxItems deliberately. A global cap can be reached before later postal codes are processed; SUMMARY identifies those regions. Retailers missing from a region receive a free explanatory note.

### Output and exports

Product observations have `recordType: "PRODUCT"`. Free input, availability or source messages have `recordType: "NOTE"`. Filter by recordType when importing into a price table. The overview dataset view shows price, regular price, promotion, member amount, unit price, regional scope and store compatibility columns. The deals view emphasizes printed conditions and dates.

Every run saves **SUMMARY** with item, retailer and flyer counts, region outcomes, free notes, source failures, duplicate exclusions and spending-limit status. **DEALS** contains delivered ad observations. **FLYERS**, when requested, contains page metadata for opened circulars without an additional charge. Large exports use an index naming numbered parts. The default dataset can also be exported as JSON, CSV, Excel or through the API.

A real CVS detail observed on 4 November 2026 returned these selected values:

```json
{
  "retailer": "CVS Pharmacy",
  "flyerId": "8196144",
  "itemId": "1049167328",
  "title": "Café Bustelo coffee K-Cup 10 ct or DairySky instant non-fat dry milk 26 oz.",
  "price": 7.99,
  "regularPrice": null,
  "priceText": "$7.99 WITH CARD",
  "memberPrice": 7.99,
  "postalCode": "10001",
  "currency": "USD",
  "validFrom": "2026-11-01T00:00:00-04:00",
  "validTo": "2026-11-14T23:59:59-05:00"
}
```

### Pricing and cost control

Only delivered distinct ad items incur an item charge. Overlapping terms, repeated postal codes, the same flyer found in nearby regions, retries, empty results, failures, notes, SUMMARY and optional flyer metadata have no item charge. The same item in a different flyer remains a distinct observation. The first matched postal code is retained when a flyer overlaps regions.

| Items | Base | Bronze | Silver | Gold |
| --- | --- | --- | --- | --- |
| 20 | $0.04 | $0.038 | $0.036 | $0.032 |
| 100 | $0.20 | $0.19 | $0.18 | $0.16 |
| 1,000 | $2.00 | $1.90 | $1.80 | $1.60 |

Add the minimum $0.00005 platform start charge. Set Apify's maximum total charge alongside the item cap. The Actor checks room before saving another paid row and ends cleanly when the remaining budget cannot cover it. Saved rows form a durable delivery ledger; restart recovery checks acknowledged charges before continuing.

### Monitor prices every day

Save a task containing the same regions, retailers and filters, then create an Apify schedule using that task and your chosen timezone. Keep each completed run's dataset and SUMMARY as a separate snapshot. Store the observation timestamp alongside the offer validity, currency, quantity and conditions. Use snapshots for dated offer pages, regional brand comparisons and promotion history.

Use country, merchantId, flyerId and itemId to deduplicate within a snapshot. Ad IDs may be replaced in later circulars, so retain titles and explicit brand/size information for your own longitudinal matching. SUMMARY distinguishes empty regions from source failures before a downstream workflow accepts the snapshot. No schedules are created automatically.

### API and automation

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("moggedhq/weekly-ads-scraper").call(run_input={
    "postalCodes": ["10001"], "retailers": ["CVS", "Target"],
    "searchTerms": ["coffee"], "maxItems": 20
})
rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('moggedhq/weekly-ads-scraper').call({
  postalCodes: ['M5V2T6'], retailers: ['No Frills'], maxItems: 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Make, Zapier, n8n, webhooks and spreadsheet imports can consume the completed dataset. Preserve nulls and currency fields. Read SUMMARY before replacing an existing price snapshot.

### Use with AI agents (MCP)

Connect your Apify account to `https://mcp.apify.com`. Ask the agent to call `moggedhq/weekly-ads-scraper` with postalCodes, retailers and a maximum item count, then read SUMMARY and the dataset. Example: collect current coffee and egg flyer offers for CVS and Target near 10001, up to 20 items, preserving card requirements and validity dates. Use the same fields for Canadian regions without manually changing locale.

### Limits

Coverage is the current published regional flyer feed, not an exhaustive retailer catalog or verified shelf price at an exact store. Some chains, regions and image-only circulars have no structured item rows. Future previews, expired offers, unnamed image panels, historical backfill and online-only ecommerce deals are excluded. A flyer can advertise several varieties or package sizes in one entry. Availability in an ad does not establish stock.

Only structured text is extracted. Image-only small print, barcodes, exact-store identities, inventory, checkout totals, taxes, coupon clipping and personalized eligibility are outside coverage. priceText combines structured strings and is not an OCR transcription. Page metadata does not include downloaded page images. Item categories, brands and original prices can be null.

Postal syntax alone does not establish geography. The Actor checks Flipp's separate location service and each flyer's postal metadata before delivering paid items. An unresolved or different location returns a free geography note; a missing or mismatched flyer postal code skips only that flyer. A Canadian prefix-only resolution is labeled source-resolved-postal-area and keeps that prefix in postalCode/location. Flipp's city, region and country labels are source reports, not postal-authority validation or exact-store verification. Feed postal_code can echo the request and is never sufficient by itself. Source interruptions can leave incomplete output; inspect freeFailures and region outcomes. A capped run is not a complete metro sweep. The Actor stops new work before the configured run timeout and marks timeLimitReached in SUMMARY. Large caps do not imply every size has been volume-tested.

### FAQ

**Why does a price look different from the shelf?** It is a regional advertised amount with its printed purchase conditions.

**Are unpriced entries charged?** Named current offers are useful ad items even when numeric price is null. Unnamed panels are excluded.

**Does a card offer imply everyone qualifies?** No. Retain its structured conditions and any disclaimer with the amount.

**Do repeated inputs cost twice?** A country, merchant, flyer and item combination is delivered and charged once per run.

**Can I export just deals?** All product rows are published flyer observations. Use the deals dataset view or DEALS export and retain price conditions.

# Actor input Schema

## `postalCodes` (type: `array`):

Full US ZIP or Canadian postal codes, such as 10001 or M5V 2T6. At least one required; no default location substitution. Up to 100 codes.

## `retailers` (type: `array`):

Retailer names, case and punctuation ignored. CVS matches CVS Pharmacy. Empty means every retailer with a current flyer in each region.

## `searchTerms` (type: `array`):

Keep named flyer items containing any term, such as coffee or eggs. Empty or \* keeps all names. Searches published flyers, not catalog or online-only deals.

## `categories` (type: `array`):

Filter source flyer categories, such as Groceries, Pharmacy, Home & Garden, Pets or Electronics. Empty includes all categories. Does not infer product categories.

## `includeFlyerPages` (type: `boolean`):

Save free FLYERS metadata: flyer dimensions, page IDs, numbers and coordinates. Does not download page images or run OCR.

## `maxItemsPerFlyer` (type: `integer`):

Cap distinct matching ad items per flyer across all requested regions. Raise for whole circulars.

## `maxItems` (type: `integer`):

Global cap across postal codes and retailers. At the base price 20 items cost $0.04 plus the minimum start charge. Duplicates and notes have no item charge.

## `proxyConfiguration` (type: `object`):

Direct public HTTP by default. Refusals retry through the account default datacenter pool, then country-matched residential. Explicit settings, including direct-only, are honored on every attempt.

## Actor input object example

```json
{
  "postalCodes": [
    "10001"
  ],
  "retailers": [
    "CVS",
    "Target"
  ],
  "searchTerms": [
    "coffee"
  ],
  "categories": [],
  "includeFlyerPages": false,
  "maxItemsPerFlyer": 20,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `dealsView` (type: `string`):

No description

## `deals` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `flyers` (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 = {
    "postalCodes": [
        "10001"
    ],
    "retailers": [
        "CVS",
        "Target"
    ],
    "searchTerms": [
        "coffee"
    ],
    "maxItemsPerFlyer": 20,
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moggedhq/weekly-ads-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 = {
    "postalCodes": ["10001"],
    "retailers": [
        "CVS",
        "Target",
    ],
    "searchTerms": ["coffee"],
    "maxItemsPerFlyer": 20,
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("moggedhq/weekly-ads-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 '{
  "postalCodes": [
    "10001"
  ],
  "retailers": [
    "CVS",
    "Target"
  ],
  "searchTerms": [
    "coffee"
  ],
  "maxItemsPerFlyer": 20,
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call moggedhq/weekly-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moggedhq/weekly-ads-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/Y7grSyYXbxAmGyfy8/builds/VfMHswrUaJM6dsOBa/openapi.json
