# Mercatus Grocery Store Locator Scraper (`guacamaya/mercatus-grocery-store-locator-scraper`) Actor

Extract store locations - addresses, phone numbers, hours, and GPS coordinates — from grocery banners built on the Mercatus e-commerce platform, including Brookshire's, Super 1 Foods, Fresh by Brookshire's, and Smart & Final.

- **URL**: https://apify.com/guacamaya/mercatus-grocery-store-locator-scraper.md
- **Developed by:** [Rafael Marcano](https://apify.com/guacamaya) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Mercatus Grocery Store Locator Scraper

Extract complete store location data — addresses, phone numbers, opening hours, geo-coordinates, and more — from any grocery banner built on the **Mercatus** storefront platform, across one or many domains in a single run. No browser rendering needed, so runs are fast and lightweight.

Confirmed working banners include:

- [Brookshire's](https://www.brookshires.com) (`brookshires.com`)
- [Super 1 Foods](https://www.super1foods.com) (`super1foods.com`)
- [Fresh by Brookshire's](https://www.freshbybrookshires.com) (`freshbybrookshires.com`)
- [Smart & Final](https://www.smartandfinal.com) (`smartandfinal.com`)

Any other Mercatus-powered retailer can be added by simply supplying its domain — no code changes required.

- 🏬 Pulls every store listed in each banner's store locator
- 🏷️ Tags every record with its source `banner` so multi-domain output stays easy to filter
- 📍 Includes precise latitude/longitude for mapping and geo analysis
- ⚡ Uses the JSON API directly via Crawlee's `HttpCrawler` — no headless browser, minimal compute usage
- 🔁 Automatically paginates through the full result set for every domain, no manual configuration required
- 📦 Outputs clean, ready-to-use JSON/CSV via the Actor's default dataset

### What data does it extract?

| Field | Description |
|---|---|
| 🏪 `banner` | Root domain the record came from (e.g. `brookshires.com`) |
| 🆔 `id` | Internal store UUID |
| 🏷️ `name` | Store name (e.g. "Mineral Wells #118") |
| 🔢 `retailerStoreId` | Store number used internally by the banner |
| 📫 `addressLine1/2/3` | Street address |
| 🏙️ `city`, `countyProvinceState`, `postCode`, `country` | Location details |
| ☎️ `phone`, `email` | Store contact info |
| 🕒 `openingHours` | Human-readable store hours |
| 🌐 `timeZone` | Store's local time zone |
| 📍 `location.latitude` / `location.longitude` | Geo-coordinates |
| 🛒 `shoppingModes` | Supported modes, e.g. `Pickup`, `Planning` |
| 🚦 `status`, `type` | Store status (e.g. `Active`) and store type (e.g. `Regular`) |
| 🗣️ `languages` | Supported storefront languages |

### Input

Only `domains` is required — everything else has a sensible default.

| Field | Type | Default | Description |
|---|---|---|---|
| `domains` | Array of strings | `["brookshires.com", "super1foods.com", "freshbybrookshires.com", "smartandfinal.com"]` | Root domains to scrape. Each must belong to a retailer running the Mercatus e-commerce platform |
| `pageSize` | Integer | `30` | Number of stores requested per page |

Example input:

```json
{
    "domains": ["brookshires.com", "smartandfinal.com"],
    "pageSize": 30
}
````

### Output

Each item in the dataset is one store record, straight from that banner's storefront platform, with a `banner` field added to identify its source:

```json
{
    "banner": "brookshires.com",
    "id": "2e52ef60-c2d5-45d6-82b8-f28dcd2e3d9e",
    "status": "Active",
    "type": "Regular",
    "name": "Mineral Wells #118",
    "addressLine1": "100 SE 17th Ave",
    "addressLine2": null,
    "addressLine3": null,
    "countyProvinceState": "TX",
    "postCode": "76067",
    "city": "Mineral Wells",
    "country": "United States of America (the)",
    "email": "storemgmt118@brookshires.com",
    "phone": "(940) 325-9549",
    "retailerStoreId": "118",
    "timeZone": "America/Chicago",
    "currency": "USD",
    "openingHours": "Daily: 7 AM - 9 PM",
    "location": {
        "latitude": 32.80875,
        "longitude": -98.097628
    },
    "languages": [
        { "isoCode": "en-US", "isDefault": true }
    ],
    "siteId": "5c049bcd-b690-4f3d-92d1-7ebc35e8f7a3",
    "urls": [],
    "categoryHierarchyId": "cdb4ba70-33cf-4288-ad9f-2131b40ce818",
    "shoppingModes": ["Pickup", "Planning"]
}
```

Results can be downloaded from the Actor run's **Dataset** tab in JSON, CSV, Excel, XML, or HTML table format.

### How it works

1. For every domain in `domains`, the Actor queries that banner's storefront platform and determines the total number of stores available.
2. It then retrieves the remaining pages of results for that domain, independently of the other domains, fetching them concurrently.
3. Each result is tagged with its source `banner` and pushed straight to the Actor's dataset — no other transformation, so the data stays as close to the source as possible.

### FAQ

**Does this need an account or API key for any banner?**
No. The data comes from the same public service each banner's own store locator page uses in the browser — no login or key required.

**How do I add a new banner?**
Add its root domain to the `domains` input array, e.g. `"staterbros.com"`. If that retailer runs on the Mercatus platform, it'll work with no other changes. If a domain doesn't resolve or returns an error, that banner likely isn't on Mercatus.

**Why no browser/Playwright?**
The data is retrieved through a lightweight JSON request rather than a full page render, so a lightweight HTTP crawler is faster and cheaper than driving a headless browser.

**One failed domain — does the whole run fail?**
No. Each domain's requests are independent; a failure on one banner is logged and the others still complete normally.

### Input schema

See [`.actor/input_schema.json`](.actor/input_schema.json) for the full input schema definition used by the Apify Console UI.

# Actor input Schema

## `domains` (type: `array`):

Root domains of the grocery banners to scrape (each must belong to a retailer running the Mercatus e-commerce platform). Add or remove entries as needed.

## `pageSize` (type: `integer`):

Number of stores to request per page.

## Actor input object example

```json
{
  "domains": [
    "brookshires.com",
    "super1foods.com",
    "freshbybrookshires.com",
    "smartandfinal.com"
  ],
  "pageSize": 30
}
```

# 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 = {
    "domains": [
        "brookshires.com",
        "super1foods.com",
        "freshbybrookshires.com",
        "smartandfinal.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("guacamaya/mercatus-grocery-store-locator-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 = { "domains": [
        "brookshires.com",
        "super1foods.com",
        "freshbybrookshires.com",
        "smartandfinal.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("guacamaya/mercatus-grocery-store-locator-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "domains": [
    "brookshires.com",
    "super1foods.com",
    "freshbybrookshires.com",
    "smartandfinal.com"
  ]
}' |
apify call guacamaya/mercatus-grocery-store-locator-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=guacamaya/mercatus-grocery-store-locator-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mercatus Grocery Store Locator Scraper",
        "description": "Extract store locations - addresses, phone numbers, hours, and GPS coordinates — from grocery banners built on the Mercatus e-commerce platform, including Brookshire's, Super 1 Foods, Fresh by Brookshire's, and Smart & Final.",
        "version": "1.0",
        "x-build-id": "rwXW8LA9h8JdBDIDi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/guacamaya~mercatus-grocery-store-locator-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-guacamaya-mercatus-grocery-store-locator-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/guacamaya~mercatus-grocery-store-locator-scraper/runs": {
            "post": {
                "operationId": "runs-sync-guacamaya-mercatus-grocery-store-locator-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/guacamaya~mercatus-grocery-store-locator-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-guacamaya-mercatus-grocery-store-locator-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "domains"
                ],
                "properties": {
                    "domains": {
                        "title": "Banner domains",
                        "type": "array",
                        "description": "Root domains of the grocery banners to scrape (each must belong to a retailer running the Mercatus e-commerce platform). Add or remove entries as needed.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "pageSize": {
                        "title": "Page size",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Number of stores to request per page.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
