Open Government, Mexico API
Overview
The Open Government Mexico (INEGI) API provides free access to official Mexican statistical data published by the National Institute of Statistics and Geography, including population, economy, geography, and census information. No API key is required for most public endpoints, making it straightforward to start querying demographic and geographic data about Mexico. It is particularly useful for researchers and developers working on Latin American data projects.
Beginner Tip
INEGI offers a dedicated indicator API — use a numeric indicator ID (like 1002000001 for total population) with the base URL https://www.inegi.org.mx/app/api/indicadores/desarrolladores/jsonxml/INDICADOR/ to fetch time-series data directly in JSON format.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Open Government, Mexico",
"description": "Mexican Statistical Government Open Data",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
Series List of data series returned for the requested indicator Series[].INDICADOR Numeric code identifying the statistical indicator Series[].DATOS Time-series data points for the indicator Series[].DATOS[].PERIODO Time period for the data point (e.g., year or quarter) Series[].DATOS[].VALOR The numeric value of the indicator for that period, returned as a string Implementation Example
const url = "https://www.inegi.org.mx/datos/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Bank Negara Malaysia Open Data
⭐ Beginner's PickBank Negara Malaysia Open Data provides free access to official financial data published by Malaysia's central bank, including exchange rates, interest rates, and key economic indicators.
BCLaws
BCLaws gives you free access to the full text of British Columbia's laws and regulations.
Brazil
⭐ Beginner's PickBrasilAPI is a free, community-driven API that centralizes public data about Brazil in one easy-to-use place.
Brazil Central Bank Open Data
The Brazil Central Bank Open Data API provides free access to official financial and economic data from Brazil s central bank (Banco Central do Brasil).
Brazil Receita WS
Brazil Receita WS lets you look up official information about Brazilian companies using their CNPJ (tax registration number).