Mexico Company Data — DENUE Business Directory (5M+) avatar

Mexico Company Data — DENUE Business Directory (5M+)

Pricing

from $4.00 / 1,000 results

Go to Apify Store
Mexico Company Data — DENUE Business Directory (5M+)

Mexico Company Data — DENUE Business Directory (5M+)

Search ~5M Mexican businesses from INEGI's official DENUE directory by keyword, location or activity. Name, economic activity, size band, full address, geo-coordinates + phone/email/website. Official open data — commercial reuse permitted. No API key needed.

Pricing

from $4.00 / 1,000 results

Rating

0.0

(0)

Developer

Berkan Kaplan

Berkan Kaplan

Maintained by Community

Actor stats

0

Bookmarked

27

Total users

7

Monthly active users

3 days ago

Last modified

Share

Mexico Company Data — DENUE (INEGI) 🇲🇽

foXLabs Americas company-registry series: Brazil · Canada · Colombia · Peru

🎉 Turn the Mexican DENUE directory into clean, structured business data — no login, no API key, one row per establishment, with the economic activity, size band, address and coordinates. Built for B2B sales, lead generation, KYB / compliance and market-research teams.

🔍 What is the Mexico Company Data — and when should you use it?

Give this actor company names or a location and it returns matching establishments from the Mexican DENUE business directory (INEGI open API) — as clean, deduplicated rows you can filter, export or feed to an AI agent. Every run reads the source live.

Use it when you need: Mexican businesses by activity and location; establishment lists for territory planning; or a directory record for a company.

Use something else when: you need financials — DENUE is a business directory (activity, size band, contacts, coordinates), not a financial database.

🤖 Use with AI agents

Already on the Apify MCP server? Ask for this Actor by name: foxlabs/mexico-denue-company-data.

Your agent can pay for its own runs. This Actor is pay-per-event with agentic payments, so an agent can discover it, run it and settle the bill over x402 (USDC on Base) or Skyfire — no Apify account or API token of its own. Billing is the same either way: per delivered record, never for errors.

Otherwise paste this into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

I want to pull Mexico company records using the Apify Actor `foxlabs/mexico-denue-company-data`.
Input: `keywords`, `states`, `location`, `scianCode` and more — see the Input table below. `maxResults` caps how many results are returned.
Start with: {"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":500}
Ask me what to look up, run the Actor, then summarise the rows as a table.

The machine-readable API, MCP config and OpenAPI definition live at apify.com/foxlabs/mexico-denue-company-data.md.

📋 Overview

Everything you need to turn the Mexican DENUE business directory (INEGI open API) into clean, structured data — in one actor, with no login, cookies or API key.

Why teams pick this actor:

  • ✅ Whole registry, one call — name or ID in, matching companies out.
  • 🧹 No empty-promise columns — only fields this registry actually fills; degenerate columns are removed.
  • 🔗 Stable identifiers — every row carries the source's own IDs, ready to join across runs and to other Fox Labs actors.
  • 💰 Per-row pricing — a minimal price per delivered row, no subscription.
  • 🤖 Agent-ready — MCP + x402 agentic payments.

✨ Features

  • 🔍 Name or ID lookup — relevance-ranked name search or exact registry-ID lookup.
  • 🏢 Full entity profile — status, legal form, formation date, address and the registry’s own contact fields.
  • 🧹 Clean schema — deduplicated camelCase rows, ready for CSV/Excel/JSON.

🎬 Quick Start

curl -X POST "https://api.apify.com/v2/acts/foxlabs~mexico-denue-company-data/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":500}'

🚀 Getting Started (3 steps)

  1. Choose your targets — company names or a location.
  2. Set the cap — maxResults limits how many results are returned.
  3. Run and export — get a clean dataset as JSON, CSV or Excel.

📥 Input

{"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":500}
FieldTypeDescription
keywordsarrayBusiness keywords or activities to search — e.g. "restaurante", "farmacia", "hotel", "ferretería". Combine with States to scope by region.
statesarrayMexican states to search — name or 2-digit INEGI code (e.g. "Jalisco", "Ciudad de México", "19"). Leave empty to search the whole country.
locationobjectAlternative to keyword search: find every business within a radius of a point. { "latitude": 19.4326, "longitude": -99.1332, "radiusMeters": 1000 }. Max radius…
scianCodestringBrowse an entire industry sector using Mexico's SCIAN 2018 classification (INEGI), e.g. "46" (retail trade) or "72" (accommodation & food). Works without a…
onlyWithContactbooleanReturn only establishments that reported at least one of phone / email / website. Best for lead-generation lists (~62% of businesses have contact info).
maxResultsintegerMaximum number of establishments to return (1–100000). A single dense city block can already return thousands.
apiTokenstringOptional. A working token is built in, so you can run this out of the box. For heavy use you may supply your own free token from inegi.org.mx (email-only signup,…

📤 Output

One row per result, saved to the dataset. Every row carries scrapedAt. Lookups that cannot be completed are reported in the run log rather than silently dropped.

FieldDescription
idId
cleeClee
nameName
legalNameLegal Name
activityActivity
sizeBandSize Band
establishmentTypeEstablishment Type
streetStreet
exteriorNumberExterior Number
interiorNumberInterior Number
neighborhoodNeighborhood
postalCodePostal code
municipalityMunicipality
stateState / province
fullAddressFull Address
latitudeLatitude
longitudeLongitude
phonePhone
emailEmail
websiteWebsite
hasContactHas Contact
contactMethodsContact Methods
sourceSource
sourceUrlPublic registry URL for the record
licenseLicense

💼 Use cases

1. Mexico B2B lead lists — establishments by activity and location. Input: name searches or a location. Output: establishments + activity + coordinates. Use: a ready territory list.

2. Market mapping — map businesses by size and area. Input: a location. Output: establishments + coordinates. Use: build a coverage map.

3. Directory enrichment — attach activity and size to a business. Input: company names. Output: the DENUE record. Use: enrich a lead.

🔗 Integration

JavaScript / Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('foxlabs/mexico-denue-company-data').call({"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":500});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('foxlabs/mexico-denue-company-data').call(run_input={"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":500})
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item)

Written for apify-client 3 for Python, where call() returns a run object; with version 1 or 2 it returns a dict — write run['defaultDatasetId'] there.

Automation (n8n / Zapier / Make): schedule or webhook → HTTP request to the actor API with your input → handle the JSON dataset → push to a sheet, CRM or dashboard.

📊 Pricing

Pay-per-event: per delivered record. Empty or failed lookups are never billed. View current pricing.

Spending limit. Records are written in batches. Before each batch the Actor checks the run's maximum charge — the limit you set for the run, or else what is left of your monthly usage limit. When there is no room for more it stops, keeps what it has delivered, and the status message says how many records you got.

❓ FAQ

Do I need an account, login or API key? No. This reads the Mexican DENUE business directory (INEGI open API).

What do I search by? Company names or a location.

How current is the data? Every run queries the source live, so results are as fresh as the registry.

Does it include contact details? Where DENUE publishes them: phone, email and website, plus economic activity, size band and coordinates.

Can I export to CSV / Excel / JSON? Yes — directly from the Apify dataset.

🐛 Troubleshooting

  • Fewer rows than expected — raise maxResults, or refine the input. Every run ends with a status message that says how many records were delivered and, if it stopped early, why.
  • The run ended with "stopped because the maximum charge … was reached" — the run's maximum charge, or what is left of your monthly usage limit, covered fewer records than the search found. The dataset holds the ones that were delivered; raise the limit and run again for the rest.
  • A name returns an unexpected entity — it matched a similar registered name; search the exact registry ID.
  • No rows for a name — try the entity’s exact legal name or its registry ID.

This actor reads a public government business registry published as open data. Results can still contain personal data (e.g. a registered agent’s name); personal data is protected by the GDPR and similar laws, so only process it with a legitimate basis. See Apify’s blog post on the legality of web scraping.

🤝 Support & contact

Changelog

0.1.18 — 2026-10-08 — README: the Python example works with the current Apify client

  • The README's Python example read the results with run['defaultDatasetId']. With the current Apify client for Python (version 3) call() returns a run object, not a dict, and that line raised TypeError: 'Run' object is not subscriptable — after the run itself had finished. The example now reads run.default_dataset_id; with client version 1 or 2, keep run['defaultDatasetId']. Checked with apify-client 3.2.1, 2.5.1 and 1.12.2.
  • No code, output field or pricing change.

0.1.16 — 2026-10-07 — records are written in batches; the run stops at your spending limit and says so

  • Faster delivery. Records are now written to the dataset in batches of 500 instead of one request per record; a run of 3,000 records used to spend about 100 seconds on that.
  • A run that reaches its maximum charge stops by itself and tells you. The maximum charge is the limit you set for the run, or else what is left of your monthly usage limit. The Actor now checks it before each batch, delivers only what it covers, and ends with a status message that says how many records you got.
  • Every run ends with a status message — how many records were delivered, or that nothing matched the input.
  • No output field changed, no pricing change.

0.1.15 — 2026-10-07 — a run that Apify starts again does not write a record twice

  • A run that the platform starts again no longer repeats what it has written. Apify can move a run to another server while it is going; the Actor then starts again from the top with the same dataset. Until now it wrote every record again: in a test with maxResults 3000 that was started again after 639 rows, the dataset ended with 3,652 rows — 652 of them written and charged twice. The Actor now first reads which records its own dataset already holds; they count towards maxResults and are not written or charged again.
  • No output field changed, no pricing change.

0.1.14 — 2026-09-20 — FIX: every run returned 0 rows (double-encoded API response)

  • The Actor returned no data at all. DENUE answers with the JSON array double-encoded: the response body is a JSON string whose content is the array. JSON.parse(body) therefore produced a string, Array.isArray() was false, and the code fell through to an empty array. Every page looked "empty", the loop broke on the first request, and the run finished SUCCEEDED with 0 rows — no error, no warning.
  • Fixed by parsing a second time when the first parse yields a string. Measured after the fix: {"keywords":["restaurante"],"states":["Ciudad de México"],"maxResults":5} returned 5 records, 2 with contact details (before: 0).
  • The silent path is gone: a response that is neither an array nor parseable now logs a warning naming the endpoint, instead of quietly returning nothing.
  • README examples corrected against the real input schema in the same release (they used queries / maxResultsPerQuery, which this Actor does not accept, plus a placeholder value).

0.1 — 2026-09-07

  • Enabled AI-agent payments (x402) + rebuilt the README to the full standard (What-is / when, AI-agents + x402 agentic payments + MCP, Overview, Features, Use cases, Integration, FAQ, Troubleshooting, Support & contact).

0.0

  • Initial release: data from the Mexican DENUE business directory (INEGI open API) by name or registry ID.