# Dollar Tree Store Locator Scraper - All US Store Links (`datacach/dollar-tree-store-locator-scraper`) Actor

Scrape every Dollar Tree store page URL in the US. Crawls the official store locator by state and city to extract store links, ready for further address, hours, and location data extraction.

- **URL**: https://apify.com/datacach/dollar-tree-store-locator-scraper.md
- **Developed by:** [DataCach](https://apify.com/datacach) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 links

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/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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Dollar Tree Store Locator Scraper

Scrape every **Dollar Tree store page URL** in the United States, straight from the official [Dollar Tree store locator](https://locations.dollartree.com/) — no coding, no CSS selectors, no coordinates required.

### What is Dollar Tree Store Locator Scraper?

Dollar Tree Store Locator Scraper is an Apify Actor that **extracts store page links** for every Dollar Tree location across the US. It crawls the store locator directory in three levels — states, then cities, then individual stores — and returns a clean, deduplicated **dataset** of store URLs, each ready to feed into a second-stage scraper for address, phone, hours, and geolocation data.

It's built for anyone who needs a **complete, up-to-date list of Dollar Tree store URLs** — no manual browsing, no rate-limit guesswork, and no anti-bot headaches.

### What can Dollar Tree Store Locator Scraper do?

- 🔍 **Auto-discover every store** — crawls all 49 states and hundreds of cities without any start URLs or coordinates.
- ⚙️ **Cap or resume runs** — use `maxResults`, `startIndex`, and `excludeUrls` to limit a run or pick up exactly where a previous one left off, without paying twice for links you already have.
- 🛡️ **Anti-bot aware** — detects WAF/CAPTCHA challenge pages and logs a graceful skip instead of crashing the run.
- 🕒 **Timestamped extraction** — every record is stamped with a UTC extraction date and time, so you always know how fresh the data is.
- 📤 **Multiple export formats** — download results as **JSON, CSV, Excel, HTML**, or XML directly from the Output tab.
- ☁️ **Full Apify platform integration** — run on demand or on a **schedule**, trigger via the **API** or **CLI**, monitor runs, and connect to **Zapier**, **Make**, and other integrations without writing glue code.

### What data does Dollar Tree Store Locator Scraper extract?

| Field | Description | Example |
|---|---|---|
| `url` | Store page URL on the Dollar Tree store locator | `https://locations.dollartree.com/ak/anchorage/dollar-tree-anchorage-ak-4715` |
| `coordinate` | Label of the discovery source (`static source` for the default crawl) | `static source` |
| `extraction_datetime` | UTC timestamp when the link was extracted (ISO 8601) | `2026-07-21T14:30:00.123456+00:00` |
| `extraction_date` | Extraction date in `mm-dd-yyyy` format | `07-21-2026` |

Each `url` is ready to be fed into a store-detail scraper (like the companion **Dollar Tree Store Details Scraper** Actor) to pull address, phone number, geolocation, and opening hours for every location.

### How do I scrape Dollar Tree store links?

<!-- TODO: embed a demo GIF or YouTube video URL on its own line here -->

1. Click **Try for free** (or **Start** if you already have the Actor).
2. Open the **Input** tab — no fields are required, so you can run it as-is.
3. *(Optional)* Set **Max results** to cap how many links this run collects.
4. *(Optional)* If you've already collected links in an earlier run, set **Start index** and/or **Exclude collected URLs** so you don't pay again for links you already have.
5. Click **Start** and watch the run progress in real time.
6. When the run finishes, open the **Output** tab and export your dataset as JSON, CSV, Excel, or HTML.

That's it — no start URLs, no proxy setup, and no store-by-store searching required.

### Input

![Dollar Tree Store Locator Scraper input example](https://raw.githubusercontent.com/BenjaminFloresV/public-datacach-apify-actors-media/main/dollar-tree-store-locator-scraper/input-example.png)

All input fields are optional — a first run needs nothing but a click on **Start**. The Actor accepts:

- **Max results** — the maximum number of unique store links to collect in this run (`0` = unlimited, crawls the whole US directory).
- **Start index** — skip this many results by position before saving any, useful for paginating across separate runs. Links are always discovered in the same stable order (states → cities → stores), so a given index is reproducible run to run.
- **Exclude collected URLs** — a list of store URLs you already have; any URL on this list is never saved again, regardless of crawl order.

See the [Input tab](https://apify.com/) on the Actor page for the full form, or call the Actor via the [Apify API](https://docs.apify.com/api/v2) with a JSON body matching these fields.

### Output example

```json
{
  "url": "https://locations.dollartree.com/ak/anchorage/dollar-tree-anchorage-ak-4715",
  "coordinate": "static source",
  "extraction_datetime": "2026-07-21T14:30:00.123456+00:00",
  "extraction_date": "07-21-2026"
}
````

You can download the full dataset in **JSON, CSV, Excel, HTML, or XML** format from the **Output** tab, or pull it programmatically via the [Dataset API](https://docs.apify.com/api/v2#/reference/datasets).

### Use cases

- **Feed a store-detail scraper** — pass every URL to the [Dollar Tree Store Details Scraper](https://apify.com/datacach/dollar-tree-store-details-scraper) to extract address, phone, hours, and geolocation for each Dollar Tree location.
- **Build a store-locator dataset** for market research, competitive analysis, or retail site-selection studies.
- **Monitor store openings/closings** over time by re-running on a **schedule** and diffing successive datasets.
- **Power a local-inventory or "find a store near me" feature** in your own app using a always-fresh list of store URLs.
- **Feed BI tools and spreadsheets** — export straight to CSV/Excel for reporting, or pipe into a data warehouse via the API.

### Dollar Tree-related Actors

| Actor | What it does |
|---|---|
| **Dollar Tree Store Locator Scraper** *(this Actor)* | Collects every Dollar Tree store page URL in the US |
| [**Dollar Tree Store Details Scraper**](https://apify.com/datacach/dollar-tree-store-details-scraper) | Takes store links and extracts address, phone, geolocation, and hours |

### FAQ

#### Is it legal to scrape Dollar Tree store locator data?

Dollar Tree Store Locator Scraper only collects **publicly available data** — the same store-locator pages served to any visitor of the Dollar Tree website. Scraping public data is generally considered legal, but you're responsible for reviewing the target site's Terms of Service and applicable laws before using the extracted data, especially for commercial purposes. This Actor does not bypass logins, paywalls, or access controls.

#### Does this Actor have an API?

Yes. Every Apify Actor, including this one, is automatically exposed as a REST **API**. You can start runs, check status, and fetch results programmatically — see the [Apify API docs](https://docs.apify.com/api/v2) — or trigger runs on a **schedule**, or connect it to **Zapier** / **Make** without writing any code.

#### Why did my run collect fewer links than expected?

Two common reasons: you're on the **free plan**, which caps runs at 10 links (upgrade to remove the cap), or the store locator returned an anti-bot challenge page for one or more state/city pages — those are logged and skipped gracefully rather than failing the whole run.

#### Can I resume a run without paying for links I already collected?

Yes. Use **Start index** to skip a stable number of already-collected results by position, or **Exclude collected URLs** to skip specific URLs regardless of order. The Actor also automatically checkpoints progress within a single run, so a migration or restart mid-run won't re-charge you for links it already pushed.

### Support

Found a bug or have a feature request? Open an issue on the Actor's **Issues** tab in Apify Console. Need a custom version of this scraper — different fields, a different retailer, or a fully managed pipeline? Reach out via Apify Console and we can scope a custom solution.

# Actor input Schema

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

Maximum number of unique store links to collect in this run (<b>0 = unlimited</b>, crawls the entire US directory). Links are discovered automatically by crawling the store locator state → city → store pages, so no start URLs or coordinates are needed. Free plan runs are capped at 10 links regardless of this setting.

## `startIndex` (type: `integer`):

Skip this many results from the <b>start</b> before saving any. Use it to paginate across runs: if you already have the first 500 links, set <b>500</b> to begin from result 501 and avoid paying for links you already have. Links are discovered in a stable order (states, then cities, then stores), so index N is reproducible between runs. The Actor still crawls up to that point, so a large value does not make the run faster — it only changes which results are saved. Combined with <b>Max results</b>, the saved range is \[startIndex, startIndex + maxResults). Ignored on the free plan (always starts from 0).

## `excludeUrls` (type: `array`):

Store link URLs you already have, e.g. <code>https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw</code>. Any URL listed here is <b>never saved again</b>, regardless of order. Unlike <b>Start index</b>, this is order-independent — ideal when you keep a running list and only want new links. Applied after Start index. Free runs may list at most 1 URL here.

## Actor input object example

```json
{
  "maxResults": 50,
  "startIndex": 0,
  "excludeUrls": [
    "https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw"
  ]
}
```

# Actor output Schema

## `dataset` (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 = {
    "maxResults": 50,
    "excludeUrls": [
        "https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacach/dollar-tree-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 = {
    "maxResults": 50,
    "excludeUrls": ["https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw"],
}

# Run the Actor and wait for it to finish
run = client.actor("datacach/dollar-tree-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 '{
  "maxResults": 50,
  "excludeUrls": [
    "https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw"
  ]
}' |
apify call datacach/dollar-tree-store-locator-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Dollar Tree Store Locator Scraper - All US Store Links",
        "description": "Scrape every Dollar Tree store page URL in the US. Crawls the official store locator by state and city to extract store links, ready for further address, hours, and location data extraction.",
        "version": "0.0",
        "x-build-id": "ItiMwSrDArgnUSbLf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datacach~dollar-tree-store-locator-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datacach-dollar-tree-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/datacach~dollar-tree-store-locator-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datacach-dollar-tree-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/datacach~dollar-tree-store-locator-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datacach-dollar-tree-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",
                "properties": {
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of unique store links to collect in this run (<b>0 = unlimited</b>, crawls the entire US directory). Links are discovered automatically by crawling the store locator state → city → store pages, so no start URLs or coordinates are needed. Free plan runs are capped at 10 links regardless of this setting.",
                        "default": 0
                    },
                    "startIndex": {
                        "title": "Start index",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip this many results from the <b>start</b> before saving any. Use it to paginate across runs: if you already have the first 500 links, set <b>500</b> to begin from result 501 and avoid paying for links you already have. Links are discovered in a stable order (states, then cities, then stores), so index N is reproducible between runs. The Actor still crawls up to that point, so a large value does not make the run faster — it only changes which results are saved. Combined with <b>Max results</b>, the saved range is [startIndex, startIndex + maxResults). Ignored on the free plan (always starts from 0).",
                        "default": 0
                    },
                    "excludeUrls": {
                        "title": "Exclude collected URLs",
                        "type": "array",
                        "description": "Store link URLs you already have, e.g. <code>https://locations.dollartree.com/al/aliceville/105-memorial-parkway-nw</code>. Any URL listed here is <b>never saved again</b>, regardless of order. Unlike <b>Start index</b>, this is order-independent — ideal when you keep a running list and only want new links. Applied after Start index. Free runs may list at most 1 URL here.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
