INEGI Mexico Indicators Scraper
parseforge/inegi-mexico-indicators-scraper
AutomationIntegrations
Scrapes official Mexican economic indicators from INEGI's BIE API. Returns time series data for each indicator ID and geographic area as flat rows.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 87
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 9 days ago
Overview
INEGI Mexico Indicators Scraper
Scrape official Mexican economic indicators from INEGI's BIE API, up to a million per run. Every indicator comes with its time series, geographic area, and metadata. No scraping infrastructure needed. Export to CSV, JSON, Excel, or XML.
INEGI's official API requires a token, careful query construction, and pagination handling. This actor reads the Banco de Información Económica (BIE) directly, filters by indicator ID and geographic area, and returns each series in one fixed schema. It is the fastest way to get Mexican economic data into your pipeline.
| Who uses it | What they scrape INEGI for |
|---|---|
| Economists | Monitoring inflation, GDP, and employment trends for Mexico |
| Financial analysts | Pulling exchange rates and interest rates for models |
| Data journalists | Getting official statistics for stories on the Mexican economy |
| Academic researchers | Building datasets for economic studies |
| Business intelligence teams | Tracking regional economic indicators for market entry |
What it does
This Actor collects INEGI BIE indicator time series by indicator ID and geographic area, and returns each observation as a flat row.
- 📈 Time series retrieval: fetches the full history for each indicator, from the earliest available date to the latest.
- 🗺️ Geographic filtering: supports national (0700) and subnational codes, so you can get state or municipal data.
- 🔑 Token-based access: uses your free INEGI API token, no scraping of HTML pages.
- 📊 Flat row output: each observation is a separate row with indicator ID, date, value, and metadata, ready for analysis.
- ⚙️ Batch processing: accepts multiple indicator IDs in one run, up to the maxItems limit.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with INEGI data
📉 Monitor inflation trends.
An economist runs the actor daily with the INPC indicator ID to track consumer price changes and update forecasts.
💱 Track exchange rates.
A financial analyst pulls the peso-dollar exchange rate series to feed into currency risk models.
🏭 Analyze regional employment.
A business intelligence team uses state-level employment indicators to compare labor markets across Mexico.
📰 Support data journalism.
A journalist retrieves GDP and unemployment data to create charts for a story on economic recovery.
🎓 Build research datasets.
An academic researcher collects multiple indicators over decades to study long-term economic patterns.
Why choose this scraper
| What you get | |
|---|---|
| Official data | Direct from INEGI's BIE API, the authoritative source for Mexican statistics. |
| No scraping setup | provide your token and indicator IDs, the actor handles the API calls. |
| Flexible geography | Get national or subnational series with a simple code change. |
| Scalable | Collect up to a million indicators per run, limited only by your token quota. |
| Clean output | Flat rows with consistent schema, easy to export to CSV, JSON, Excel, or XML. |
How it compares
No other Store actor targets INEGI the same way, so the honest comparison is with the alternatives teams actually weigh.
| INEGI Mexico Indicators Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When INEGI changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor with indicator IDs and a geographic area code, and set a maximum number of indicators to collect per run. The Input tab lists every parameter.
A first run with the defaults:
{
"geoArea": "0700",
"maxItems": 10
}
A larger pull:
{
"geoArea": "0700",
"maxItems": 200
}
Pricing
Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the INEGI Mexico Indicators Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to INEGI through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/inegi-mexico-indicators-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting an error record instead of data?
The most common cause is an invalid or missing API token. Check that your token is correctly entered in the input and that it has not expired. Also verify your indicator IDs are correct.
Why is my run returning fewer indicators than maxItems?
Your INEGI API token may have a rate limit or quota. The actor will stop when it reaches the limit. Try reducing maxItems or wait and run again.
Why is the geographic area code not working?
Ensure you are using a valid INEGI geographic area code. The default 0700 is national. For other areas, refer to INEGI's documentation for the correct code.
Why are some dates missing from the time series?
INEGI may not have data for every date, especially for less frequent indicators. The actor returns only the observations that exist in the API.
FAQ
| Question | Answer |
|---|---|
| Do I need an INEGI API token? | Yes, the actor requires a free token from INEGI. You can get one at inegi.org.mx/servicios/api_indicadores.html. Without a token, the actor returns an error record. |
| Where do I find indicator IDs? | Indicator IDs are available in the INEGI BIE catalog. You can browse indicators on the INEGI website or use their API documentation to find the idIndicador for your series. |
| What geographic areas can I query? | You can query any geographic area supported by INEGI's BIE. The default is 0700 for national level, but you can use codes for states, municipalities, or other areas as defined by INEGI. |
| How many indicators can I collect in one run? | You can set maxItems up to 1,000,000, but the actual number depends on your INEGI API token quota and rate limits. The actor will collect as many as allowed. |
| What output formats are supported? | The actor returns data in a flat row format that can be exported to CSV, JSON, Excel, or XML from the Apify platform. |
| Can I get historical data? | Yes, the actor fetches the full time series for each indicator, including all available historical observations. |
| Is the data updated in real time? | The data is as current as INEGI's API provides. The actor queries the API at run time, so you get the latest available values. |
| What if I get an error about my token? | Check that your token is valid and has not expired. Also ensure you have not exceeded your API quota. The actor will return an error record with details. |
| Can I schedule this actor to run automatically? | Yes, you can set up a schedule on the Apify platform to run the actor at regular intervals, such as daily or weekly. |
| Does this actor scrape the INEGI website? | No, it uses the official INEGI API, which is the recommended way to access their data. This ensures compliance and reliability. |
Related actors
Browse the full ParseForge collection for more scrapers.
🆘 Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
⚠️ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Instituto Nacional de Estadística y Geografía (INEGI). It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| indicatorIds | array | INEGI BIE indicator IDs (idIndicador). Example: ['628194'] for Tipo de cambio. | ["628194"] |
| geoArea | string | INEGI geographic area code. 0700 = national level, 07000001 = state, etc. Default 0700. | 0700 |
| token | string | Your free INEGI API token. Get one at inegi.org.mx/servicios/api_indicadores.html. If empty the actor cannot query and returns an error record. | not set |
| maxItems | integer | How many indicators to collect per run. | 10 |
Pricing
from $7.50 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.0075 to $0.0085 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~inegi-mexico-indicators-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
