# DENUE Mexico Business Directory (INEGI Company Data & Leads) (`steadyscrape/denue-mexico-business-directory`) Actor

Mexico's official business directory DENUE (INEGI): 5M+ companies with name, legal name, SCIAN activity, staff size, address, coordinates, phone, email and website. Filter by state, municipality, postal code, activity or keyword, or get only new businesses. Export to JSON, CSV or Excel, or via API.

- **URL**: https://apify.com/steadyscrape/denue-mexico-business-directory.md
- **Developed by:** [Steady Scrape](https://apify.com/steadyscrape) (community)
- **Categories:** Lead generation, Business
- **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

## DENUE Mexico Business Directory (INEGI Company Data & Leads)

Get **DENUE** — the **Directorio Estadístico Nacional de Unidades Económicas**, Mexico's official **business directory**
published by **INEGI** — as clean data. Over **5 million Mexican businesses** with their **name**, **legal name (razón
social)**, **SCIAN activity code and name**, **staff size**, **full address and postal code**, **state, municipality and
locality**, **coordinates**, **phone**, **email** and **website**. Filter by **state**, **municipality**, **postal code**,
**neighbourhood (colonia)**, **SCIAN sector or activity**, **keywords** and **staff size**, keep only businesses **with an
email, a phone or a website**, or receive only the **businesses new in DENUE** since your last run.

No login, no browser, no scraping: the Actor reads INEGI's official bulk files. Export to JSON, CSV or Excel, or via API.

### What you can do with the Mexico business directory

- **B2B lead generation in Mexico**: every dentist, restaurant, hotel, pharmacy, workshop or factory of a city, with
  phone, email and website, ready for a CRM or a cold-email tool.
- **Sales territories and field sales**: businesses of a municipality or a postal code, with coordinates and a Google
  Maps link for route planning.
- **Market research and site selection**: how many businesses of an activity there are per state, municipality or
  colonia, and how large they are (staff bands).
- **Monitor new businesses**: schedule a run with **Only new businesses** to receive the businesses INEGI adds in each new
  DENUE release, for your filters.
- **Data enrichment**: match your own list of Mexican companies against DENUE's legal names, activities and addresses.

### Input

| Field | What it does |
|---|---|
| **States** | Mexican states by INEGI code (`06` Colima, `09` Ciudad de México, `14` Jalisco, `19` Nuevo León…). Empty reads the whole country. |
| **Municipalities** | Municipality names (alcaldías in Mexico City): `Guadalajara`, `Monterrey`, `Benito Juárez`. Case and accents do not matter. |
| **Localities** | Towns as INEGI names them: `Ciudad de Villa de Álvarez`, `Suchitlán`. |
| **Neighbourhoods (colonias)** | Words a colonia, fraccionamiento or barrio contains: `Polanco` finds "POLANCO V SECCION". |
| **Postal codes** | Whole codes (`06600`) or their first digits (`066`). |
| **Sectors (SCIAN)** | The 20 SCIAN 2018 sectors: 46 retail, 72 hotels and restaurants, 62 health care, 54 professional services… |
| **Activity codes (SCIAN)** | Codes or their first 2–6 digits: `7225` restaurants, `621111` doctors' offices, `4611` grocery stores, `8121` beauty salons. |
| **Keywords** | Words in the business name, the legal name or the activity, from the start of a word: `taco` finds "TACOS EL GÜERO". |
| **Staff size** | 0–5, 6–10, 11–30, 31–50, 51–100, 101–250, 251 or more people. |
| **Only with an email / a phone / a website** | Keep only businesses carrying that contact detail. |
| **Added to DENUE from** | `YYYY-MM` or `YYYY`: businesses INEGI added to the directory that month or later. |
| **Only new businesses since the last run** | Monitor mode (see below). |
| **Max businesses** | 1,000 by default; 0 for all. |

Example — restaurants in Guadalajara with an email:

```json
{
    "states": ["14"],
    "municipalities": ["Guadalajara"],
    "activityCodes": ["7225"],
    "requireEmail": true,
    "maxResults": 0
}
```

Example — dentists in Mexico City's Benito Juárez and Cuauhtémoc alcaldías:

```json
{
    "states": ["09"],
    "municipalities": ["Benito Juárez", "Cuauhtémoc"],
    "activityCodes": ["621211", "621212"],
    "maxResults": 0
}
```

### Output

One row per business, as INEGI lists it (values trimmed; emails lower-cased; an email field holding no address is left
empty):

```json
{
    "denueId": "320817",
    "name": "CAFE NOGUERAS",
    "legalName": "CAFE NOGUERAS",
    "activityCode": "461190",
    "activityName": "Comercio al por menor de otros alimentos",
    "sectorCode": "46",
    "sectorName": "Comercio al por menor",
    "staffRange": "6-10",
    "staffMin": 6,
    "staffMax": 10,
    "address": "CALLE VENUSTIANO CARRANZA 160, FRACCIONAMIENTO REAL CAMPESTRE COMALA, 28450 Comala, Colima",
    "street": "CALLE VENUSTIANO CARRANZA",
    "exteriorNumber": "160",
    "betweenStreets": ["CARRETERA CUATRO CARRILES", "CALLE ALVARO OBREGON"],
    "neighborhood": "REAL CAMPESTRE COMALA",
    "postalCode": "28450",
    "stateCode": "06",
    "state": "Colima",
    "municipality": "Comala",
    "locality": "Comala",
    "latitude": 19.3208098,
    "longitude": -103.7594651,
    "googleMapsUrl": "https://www.google.com/maps/search/?api=1&query=19.3208098,-103.7594651",
    "phone": "3125948193",
    "email": "cafenogueras@gmail.com",
    "website": "www.cafenogueras.com.mx",
    "establishmentType": "Fijo",
    "registeredOn": "2010-07",
    "release": "05/2026",
    "source": "Fuente: INEGI, Directorio Estadístico Nacional de Unidades Económicas (DENUE) 05/2026"
}
```

| Field | Meaning |
|---|---|
| `denueId`, `clee` | DENUE's number for the business, kept between releases, and INEGI's statistical key. |
| `name`, `legalName` | The name on the sign, and the razón social (INEGI leaves it empty for businesses owned by a person). |
| `activityCode`, `activityName`, `sectorCode`, `sectorName` | SCIAN 2018 classification, in Spanish as INEGI writes it. |
| `staffRange`, `staffMin`, `staffMax` | DENUE's band of people employed (`staffMax` is null for 251+). |
| `address`, `street`, `exteriorNumber`, `interiorNumber`, `building`, `floor`, `betweenStreets`, `backStreet`, `neighborhood`, `neighborhoodType`, `shoppingCenter`, `shoppingCenterType`, `shopNumber`, `postalCode` | The address in one line, then its parts: street, exterior and interior number, building, floor, the streets it sits between, the street behind, colonia and its type, shopping centre, its type and the shop number, postal code. |
| `stateCode`/`state`, `municipalityCode`/`municipality`, `localityCode`/`locality`, `ageb`, `block` | INEGI's geographic codes and names. |
| `latitude`, `longitude`, `googleMapsUrl` | Coordinates and a map link. |
| `phone`, `email`, `website` | Contact details when the business gave them: in Colima 44 % have a phone, 20 % an email, 7 % a website; in Mexico City 36 %, 23 % and 11 %. |
| `establishmentType` | `Fijo`, or `Semifijo` (a stall that stays in one place). |
| `registeredOn` | `YYYY-MM`, the month the business entered DENUE (not when it opened). |
| `sourceFile`, `release`, `releaseDate`, `source` | The INEGI bulk file read, the DENUE release, and the credit INEGI asks for. |
| `changeType` | `added` in Only-new runs. |
| `rowType`, `status`, `scrapedAt` | `business` and `ok` for a business, `status` for a free status row; when the row was written (UTC). |

A search with nothing to deliver gives one free row (`rowType: "status"`) with `status`, `reason` and `query`: `no_results`, `no_changes`,
`baseline_saved`, `spending_limit` or `blocked`. The run summary (key-value store record `SUMMARY`) lists the files read,
the rows scanned and matching, and the release.

### How the Mexico business directory is read

INEGI publishes DENUE as one bulk file per state (México in two) and one national file per SCIAN sector (retail,
restaurants and other services split into parts). For each run the Actor picks the smaller set covering your filters —
your states' files, or the national files of the activities you chose — downloads them from INEGI and filters them as
they arrive. It stops reading as soon as it has your maximum, so a small search downloads only part of one file: ten
restaurants in Colima take about 4 seconds. Mexico City's whole file is 45 MB (463,000 businesses) and takes about a minute,
most of it the download from INEGI.

### Monitor new businesses in DENUE

With **Only new businesses since the last run**, the first run saves the DENUE ids matching your filters as a baseline,
delivering no business (only the files holding businesses that match are charged; in your account, key-value store `steadyscrape-denue-mexico-business-directory-state`, one record per set of
filters). Each later run delivers only the businesses that were not there before, with `changeType: "added"`, and the
summary counts those that left DENUE. INEGI publishes a new DENUE release a few times a year; until it does, a run sees
the files unchanged, downloads nothing (one 64 KB request per file) and charges nothing. Businesses past your maximum or
your spending limit stay for the next run.

### Pricing

Pay per event:

- **US$0.001 per business** delivered;
- **US$0.005 per INEGI bulk file holding businesses that match your filters** (`source-file`): a search in one state or
  one sector reads one file. A file with no match is not charged.

Status rows (nothing found, nothing new, baseline saved) are free: a search that matches nothing charges nothing, and an
Only-new run that finds the files unchanged reads and charges nothing. Examples: 10 restaurants with a phone in Colima cost US$0.015; 1,000 restaurants with an email in
Jalisco cost US$1.005.

### Limits

- DENUE is updated by INEGI a few times a year (this release: 05/2026, published 2026-05-20); a business that opened
  after the last field update is not in it yet. `registeredOn` is when INEGI added the business, not when it opened.
- Contact details are what each business gave INEGI: many small businesses have no phone, email or website.
- Names and addresses are written as INEGI writes them (mostly capitals, Spanish).
- Municipality, locality and colonia names are matched as INEGI spells them; pick the state too, or every state is read.

### Is it legal to use DENUE data?

DENUE is public data published by INEGI under its **Términos de Libre Uso de la Información del INEGI**, which allow
anyone to copy, publish, adapt, extract and commercially exploit the information, provided the source is credited and
nothing suggests INEGI endorses the use. Each row carries the credit (`source`: "Fuente: INEGI, Directorio Estadístico
Nacional de Unidades Económicas (DENUE) 05/2026"). The filtering, selection and formatting are this Actor's, not INEGI's,
and this Actor is not affiliated with or endorsed by INEGI. Contacting businesses is subject to the rules of your
country and of Mexico (for example on unsolicited commercial messages); use the data responsibly.

# Actor input Schema

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

Mexican states to read, by INEGI code. Each state is one bulk file (México comes in two); empty reads the whole country, file by file, until the maximum. With activities chosen too, the Actor reads whichever is smaller: the states’ files or the national files of those activities.

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

Keep businesses in these municipalities, e.g. <code>Guadalajara</code>, <code>Monterrey</code>, <code>Benito Juárez</code>, <code>Cuauhtémoc</code>. Case and accents do not matter. Choose the state too, or every state is read: several states have a municipality of the same name.

## `localities` (type: `array`):

Keep businesses in these localities as INEGI names them, e.g. <code>Ciudad de Villa de Álvarez</code>, <code>Suchitlán</code>. Case and accents do not matter.

## `neighborhoods` (type: `array`):

Keep businesses whose colonia, fraccionamiento or barrio contains these words from the start of a word, e.g. <code>Polanco</code> (finds "POLANCO V SECCION"), <code>Centro</code>.

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

Keep businesses whose postal code is one of these, or starts with these digits: <code>06600</code>, or <code>066</code> for every code starting with 066. Choose the state too, or every state is read.

## `sectors` (type: `array`):

Keep businesses of these SCIAN 2018 sectors.

## `activityCodes` (type: `array`):

Keep businesses whose SCIAN 2018 code starts with these 2 to 6 digits, e.g. <code>7225</code> restaurants, <code>621111</code> doctors’ offices, <code>4611</code> grocery stores, <code>5413</code> architecture and engineering, <code>8121</code> beauty salons. Combined with the sectors above as any-of.

## `keywords` (type: `array`):

Keep businesses whose name, legal name or activity contains any of these words or phrases from the start of a word, e.g. <code>taco</code> (finds "TACOS EL GÜERO"), <code>dental</code>, <code>farmacia</code>, <code>hotel</code>. Case and accents do not matter.

## `staffRanges` (type: `array`):

Keep businesses in these bands of people employed, as DENUE records them.

## `requireEmail` (type: `boolean`):

Keep only businesses with an email address: 20 % of them in Colima, 23 % in Mexico City (release 05/2026).

## `requirePhone` (type: `boolean`):

Keep only businesses with a phone number: 44 % of them in Colima, 36 % in Mexico City.

## `requireWebsite` (type: `boolean`):

Keep only businesses with a website: 7 % of them in Colima, 11 % in Mexico City.

## `registeredFrom` (type: `string`):

Keep businesses INEGI added to DENUE in this month or later, e.g. <code>2024-11</code> or a year <code>2025</code>. DENUE records the month a business entered the directory, not when it opened.

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

Monitor mode: deliver only the businesses that were not in DENUE at the previous run with the same filters. The first run saves a free baseline (the files holding businesses that match are charged). INEGI publishes a new release a few times a year; until then a run sees the files unchanged, reads nothing and charges nothing.

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

The most businesses a run delivers; 0 for all. The run stops reading the files as soon as it has them, so a small maximum reads only part of a file.

## Actor input object example

```json
{
  "states": [
    "06"
  ],
  "municipalities": [],
  "localities": [],
  "neighborhoods": [],
  "postalCodes": [],
  "sectors": [],
  "activityCodes": [
    "7225"
  ],
  "keywords": [],
  "staffRanges": [],
  "requireEmail": false,
  "requirePhone": true,
  "requireWebsite": false,
  "registeredFrom": "",
  "onlyNew": false,
  "maxResults": 10
}
```

# Actor output Schema

## `businesses` (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"
    ],
    "activityCodes": [
        "7225"
    ],
    "requirePhone": true,
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadyscrape/denue-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"],
    "activityCodes": ["7225"],
    "requirePhone": True,
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("steadyscrape/denue-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"
  ],
  "activityCodes": [
    "7225"
  ],
  "requirePhone": true,
  "maxResults": 10
}' |
apify call steadyscrape/denue-mexico-business-directory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadyscrape/denue-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/GyvW0czuEBiyaAx2k/builds/mRHbVS2rE8svxEZ62/openapi.json
