# Mexico Business Directory – DENUE Leads with Phone & Email (`gazidev/mexico-business-directory`) Actor

Search Mexico's official INEGI DENUE business directory (5.5M establishments): name, legal name, SCIAN activity, employees, address, phone, email, website, GPS and date added. Filter by state, city, keyword, size. $1 per 1,000 businesses.

- **URL**: https://apify.com/gazidev/mexico-business-directory.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 businesses

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

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Mexico Business Directory – DENUE Leads with Phone & Email

Search **Mexico's official business directory, INEGI DENUE** (Directorio Estadístico Nacional de Unidades Económicas, about **5.5 million establishments**) and export **B2B leads with phone, email and website**. Each record has the business name, **legal name (razón social)**, **SCIAN activity code and name**, **employee range**, full address (street, colonia, código postal, municipality, state), **GPS coordinates** and the month the business was added to DENUE.

Filter by **state, municipality/alcaldía, postal code, keyword, SCIAN code, company size**, keep only businesses **with phone / email / website**, or get **new businesses** added since a given month.

The data comes from the official DENUE bulk files published by INEGI. No scraping of search pages, no login, no API key.

**$1 per 1,000 businesses.** You pay only for records saved.

### Who uses it

- **B2B sales and field sales teams in Mexico and LatAm**: lists of restaurants, clinics, hotels, workshops, factories or shops in a city, with phone and email, ready for a CRM.
- **Market sizing and site selection**: count competitors by municipality or postal code, with exact coordinates for maps.
- **New-business prospecting**: establishments added to DENUE since a given month (`addedSince`), or only those that are new since your last run (`onlyNew`).
- **Data teams and AI agents**: a clean, structured alternative to scraping Google Maps for Mexican businesses.

### Input examples

Restaurants in Colima with a phone number (the default prefill):

```json
{ "states": ["06"], "keyword": "restaurante", "hasPhone": true, "maxItems": 20 }
```

Dentists (SCIAN 6212) in Estado de México with email, added since 2024:

```json
{ "states": ["15"], "scianCodes": ["6212"], "hasEmail": true, "addedSince": "2024-01", "maxItems": 500 }
```

Hotels in Cancún (Benito Juárez, Quintana Roo) with 11+ employees:

```json
{ "states": ["23"], "municipalities": ["Benito Juárez"], "scianCodes": ["7211"], "employeeRanges": ["11-30", "31-50", "51-100", "101-250", "251+"], "maxItems": 0 }
```

#### Filters

| Field | Meaning |
|---|---|
| `states` | INEGI state codes `01`–`32` (e.g. `09` CDMX, `14` Jalisco, `19` Nuevo León). Required, at least one. List all 32 for the whole country (slow) |
| `keyword` | Matched against name, legal name and activity; comma-separated = any of them; ignores case and accents |
| `scianCodes` | SCIAN 2018 prefixes, e.g. `722` restaurants & bars, `4611` groceries, `6212` dentists, `7211` hotels |
| `municipalities` | Names (`Monterrey`, `Benito Juárez`) or 5-digit INEGI codes (`09014`) |
| `postalCodes` | Código postal prefixes, e.g. `06600` or `066` |
| `employeeRanges` | `0-5`, `6-10`, `11-30`, `31-50`, `51-100`, `101-250`, `251+` |
| `hasPhone`, `hasEmail`, `hasWebsite` | Only records with that contact field |
| `addedSince` | `YYYY-MM`: only establishments added to DENUE on/after that month |
| `onlyNew` + `stateKey` | Monitoring: skip DENUE ids returned by earlier runs |
| `maxItems` | Stop after N businesses (0 = all). You pay per business saved |

### Output

One record per establishment:

```json
{
  "denueId": "11466486",
  "clee": "06007722517001821000000000U7",
  "name": "3 BROTHERS WINGS",
  "legalName": null,
  "scianCode": "722517",
  "activity": "Restaurantes con servicio de preparación de pizzas, hamburguesas, hot dogs y pollos rostizados para llevar",
  "employees": "0 a 5 personas",
  "employeesMin": 0,
  "employeesMax": 5,
  "phone": "3143574276",
  "phoneE164": "+523143574276",
  "email": null,
  "website": null,
  "address": "Andador LEO 30, Barrio BARRIO4, C.P. 28219 Manzanillo, Manzanillo, Colima",
  "postalCode": "28219",
  "municipality": "Manzanillo",
  "municipalityCode": "06007",
  "state": "Colima",
  "latitude": 19.1043194,
  "longitude": -104.3063284,
  "googleMapsUrl": "https://www.google.com/maps/search/?api=1&query=19.1043194,-104.3063284",
  "addedToDenue": "2024-11",
  "denueEdition": "2026-05",
  "source": "INEGI, Directorio Estadístico Nacional de Unidades Económicas (DENUE) 2026-05",
  "license": "Términos de Libre Uso de la Información del INEGI - https://www.inegi.org.mx/inegi/terminos.html"
}
```

Also included: `street`, `exteriorNumber`, `interiorNumber`, `neighborhood` (colonia), `shoppingCenter`, `locality`, `stateCode`, `establishmentType` (Fijo/Semifijo). The run summary (`OUTPUT` in the key-value store) shows rows scanned, matches, saved records and the DENUE edition used.

### Pricing

Pay per event: **$0.001 per business saved** ($1 per 1,000), plus a $0.002 Actor start fee (covers downloading the state files). Error rows are free. Set **Max businesses** or a maximum cost per run, and the run stops cleanly at that limit.

| | This Actor | Other DENUE Actor on the Store (Oct 2026) |
|---|---|---|
| Price per record | $0.001 | $0.004 |
| Phone / email / website filters | yes | – |
| New businesses (`addedSince`, `onlyNew`) | yes | – |
| Source | official INEGI bulk files, all 32 states | INEGI DENUE |

### Use with AI agents (Apify MCP)

Add this Actor to Claude, ChatGPT or any MCP client through the [Apify MCP server](https://mcp.apify.com) and ask, for example: *"Find 50 dental clinics in Guadalajara with an email address"* or *"List hotels in Cancún with more than 50 employees."*

### FAQ

**How fresh is the data?** INEGI publishes a new DENUE edition periodically (the current files are the 05/2026 edition). Each record shows `denueEdition` and `addedToDenue`. Businesses that opened after the edition date are not included yet.

**Does every business have a phone or email?** No. Roughly 40% of records have a phone, 20% an email and under 10% a website (it varies by state and sector). Use `hasPhone` / `hasEmail` / `hasWebsite` to keep only contactable leads; you only pay for what is saved.

**Why is `legalName` often empty?** INEGI publishes the razón social only for companies (personas morales). For sole proprietors it is withheld for confidentiality.

**Why is `name` sometimes empty or generic?** When a business has no commercial name, INEGI leaves it empty or uses the activity name (e.g. "ABARROTES").

**How long does a run take?** Small states finish in seconds. A full scan of CDMX or Estado de México takes about 40–60 seconds; the Actor stops as soon as it has `maxItems` records. All 32 states take several minutes.

**Is this legal to use commercially?** Yes. INEGI's *Términos de Libre Uso de la Información* allow copying, distributing, adapting and commercial use, provided INEGI is credited as the source. Every record carries the `source` and `license` fields for that purpose.

### Data source and licence

Fuente: INEGI, *Directorio Estadístico Nacional de Unidades Económicas (DENUE)*, [descarga masiva](https://www.inegi.org.mx/app/descarga/?ti=6). Information used under the [Términos de Libre Uso de la Información del INEGI](https://www.inegi.org.mx/inegi/terminos.html). This Actor is not affiliated with or endorsed by INEGI; records are delivered as published by INEGI, with light formatting (address assembly, phone in E.164, website URL normalisation).

# Actor input Schema

## `states` (type: `array`):

Mexican states (entidades) to search, at least one. Big states: CDMX ~45 MB, Estado de México ~80 MB of ZIP.

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

Matched against the business name, legal name (razón social) and activity name. Case- and accent-insensitive, matches the start of a word. Separate several with commas (any of them), e.g. `dentista, consultorio dental`.

## `scianCodes` (type: `array`):

SCIAN 2018 code prefixes (2-6 digits), e.g. `722` restaurants & bars, `4611` grocery stores, `6212` dentists, `5311` real-estate rental, `31`-`33` manufacturing.

## `municipalities` (type: `array`):

Exact municipality names (accent-insensitive), e.g. `Guadalajara`, `Monterrey`, `Benito Juárez`, or 5-digit INEGI codes (state + municipality), e.g. `09014`.

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

E.g. `06600` (one código postal) or `066` (a zone).

## `employeeRanges` (type: `array`):

Size ranges as published by INEGI. Empty = any size.

## `hasPhone` (type: `boolean`):

Skip establishments without a phone number.

## `hasEmail` (type: `boolean`):

Skip establishments without an email address.

## `hasWebsite` (type: `boolean`):

Skip establishments without a website.

## `addedSince` (type: `string`):

New-business leads: only establishments whose `fecha_alta` (month added to the directory) is on/after this month, format `YYYY-MM`, e.g. `2025-06`.

## `onlyNew` (type: `boolean`):

Skip DENUE ids returned by earlier runs with the same *State key*. Schedule monthly to get only establishments added in a new DENUE edition.

## `stateKey` (type: `string`):

Separate 'already seen' lists for different searches.

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

Stop after this many businesses (0 = all matching). You pay per business saved.

## Actor input object example

```json
{
  "states": [
    "06"
  ],
  "keyword": "restaurante",
  "hasPhone": true,
  "hasEmail": false,
  "hasWebsite": false,
  "onlyNew": false,
  "stateKey": "default",
  "maxItems": 20
}
```

# Actor output Schema

## `businesses` (type: `string`):

No description

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

No description

## `summary` (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 = {
    "states": [
        "06"
    ],
    "keyword": "restaurante",
    "hasPhone": true,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/mexico-business-directory").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 = {
    "states": ["06"],
    "keyword": "restaurante",
    "hasPhone": True,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("gazidev/mexico-business-directory").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 '{
  "states": [
    "06"
  ],
  "keyword": "restaurante",
  "hasPhone": true,
  "maxItems": 20
}' |
apify call gazidev/mexico-business-directory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/mexico-business-directory"
        }
    }
}
```

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/8Vz6LbcPPtbr4AS3Z/builds/Qv1NLLgB7aH9LDx1v/openapi.json
