Japan Statistics Scraper (e-Stat) avatar

Japan Statistics Scraper (e-Stat)

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Japan Statistics Scraper (e-Stat)

Japan Statistics Scraper (e-Stat)

Extract official Japanese government statistics from e-Stat, Japan's national statistics portal. Search 6,000+ datasets covering population, GDP, trade, employment, agriculture, health, education, and more. Download data with English labels and automatic dimension code resolution.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

J N

J N

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Categories

Share

Extract official Japanese government statistics from e-Stat, Japan's national portal for ALL government statistics. Search 6,000+ statistical datasets covering population, GDP, trade, employment, agriculture, health, education, crime, transport, and more -- across every Japanese ministry. Download data with English labels, automatic dimension code resolution, and built-in pagination. Uses the official e-Stat API v3.0 operated by the Statistics Bureau of Japan (MIC).

What is e-Stat and why use this scraper?

e-Stat is Japan's official portal for government statistics, aggregating data from all Japanese ministries and agencies. It is comparable to the US Census Bureau + Bureau of Labor Statistics + Bureau of Economic Analysis combined into one portal. Over 6,000 statistical tables are available covering every aspect of Japanese society and economy.

The e-Stat API is powerful but complex:

  • 6,000+ datasets -- Finding the right dataset requires navigating a complex catalog of statistics codes, field categories, and survey names. This actor lets you search by simple keywords in English or Japanese.
  • Cryptic dimension codes -- Raw API data uses internal codes like @cat01: "001". This actor resolves all codes to human-readable labels like "Total population".
  • Pagination required -- Large datasets have millions of rows across multiple pages. This actor handles pagination automatically up to your specified limit.

e-Stat vs US statistics comparison

Featuree-Stat (Japan)US Census / BLS / BEA
Operated byStatistics Bureau (MIC)Census Bureau, BLS, BEA
CountryJapanUnited States
Datasets6,000+ tablesVaries by agency
API costFree (registration required)Free
LanguageJapanese + partial EnglishEnglish
Data scopeAll ministries combinedSplit across agencies
LicenseGovernment Standard Terms (CC BY 4.0 compatible)Public domain

How to extract Japanese government statistics

  1. Get a free e-Stat Application ID at e-stat.go.jp (register, then issue appId from My Page)
  2. Enter your Application ID in the input form
  3. Search for datasets by keyword (e.g., population, GDP, trade)
  4. Find a dataset ID from search results, then switch to Get Data mode
  5. Click Start -- the actor downloads data with resolved dimension labels

The prefilled example searches for population-related datasets. Just add your Application ID and run.

Three search modes

1. Search Datasets

Find statistical datasets by keyword. Returns dataset IDs, titles, ministries, survey dates, and record counts. Use this first to discover what data is available.

2. Get Statistical Data

Download actual data rows from a specific dataset ID. Each row includes resolved dimension labels (e.g., area_name: "Tokyo" instead of area_code: "13000"). Automatic pagination handles large datasets.

3. Get Metadata

Explore a dataset's dimensions and category codes. Useful for building precise filters before downloading data.

What data can you extract from e-Stat?

  • Population: Census, demographics, migration, household surveys
  • Economy: GDP, national accounts, consumer spending, CPI, price indices
  • Labor: Employment, unemployment, wages, working hours, labor force
  • Trade: Import/export, trade partners, commodity breakdown
  • Industry: Manufacturing, construction, services, retail, wholesale
  • Agriculture: Farm production, livestock, fisheries, forestry
  • Health: Medical facilities, diseases, mortality, insurance
  • Education: Schools, students, teachers, enrollment rates
  • Crime: Offenses, arrests, court cases, prison population
  • Housing: Housing starts, vacancy rates, construction costs
  • Transport: Railways, roads, aviation, shipping, vehicle registration
  • Government finance: National/local budgets, tax revenue, public debt
  • Environment: Emissions, waste, energy consumption

All data comes from official Japanese government sources across every ministry.

Input parameters

ParameterTypeRequiredDescription
appIdstringYese-Stat Application ID (free).
searchModestringNo"searchDatasets" (default), "getStatsData", or "getMetaInfo".
searchWordstringWhen searchDatasetsSearch keyword (e.g., "population", "GDP").
statsDataIdstringWhen getStatsData/getMetaInfoDataset ID (e.g., "0003445099").
languagestringNo"E" (English, default) or "J" (Japanese).
surveyYearsstringNoFilter by survey year (search mode).
statsFieldstringNoStatistics field code (search mode).
statsCodestringNoStatistics code (search mode).
cdAreastringNoArea code filter (data mode).
cdCat01stringNoCategory dimension filter (data mode).
cdTimestringNoTime period filter (data mode).
maxResultsintegerNoMax results (1-1,000,000). Default: 1000.

Example: Search for population datasets

{
"appId": "your-app-id",
"searchMode": "searchDatasets",
"searchWord": "population",
"language": "E"
}

Example: Download GDP data

{
"appId": "your-app-id",
"searchMode": "getStatsData",
"statsDataId": "0003109741",
"language": "E",
"maxResults": 5000
}

Example: Explore dataset dimensions

{
"appId": "your-app-id",
"searchMode": "getMetaInfo",
"statsDataId": "0003445099",
"language": "E"
}

The following is an illustrative example of a dataset search result.

{
"datasetId": "0003445099",
"statisticsName": "Population Census",
"governmentOrg": "Ministry of Internal Affairs and Communications",
"title": "Population by Age (Five-Year Groups) and Sex",
"surveyDate": "2020",
"openDate": "2021-11-30",
"overallTotalNumber": "1920",
"updatedDate": "2022-02-15",
"dataSource": "Source: Created by processing data from e-Stat ..."
}

Sample output: Statistical data

The following is an illustrative example of a data row from a population dataset.

{
"tab_code": "020",
"tab_name": "Population",
"cat01_code": "001",
"cat01_name": "Total population",
"area_code": "00000",
"area_name": "All Japan",
"time_code": "2020000000",
"time_name": "2020",
"value": "126146099",
"unit": "person",
"dataSource": "Source: Created by processing data from e-Stat ..."
}

Output fields

Search Datasets mode

FieldTypeDescription
datasetIdstringe-Stat dataset ID
statisticsNamestringName of the statistical survey
governmentOrgstringMinistry or agency
titlestringDataset/table title
surveyDatestringSurvey date or period
openDatestringPublication date
overallTotalNumberstringTotal records in dataset
updatedDatestringLast update date
statisticsNameSpecstringTabulation category
descriptionstringDataset description
dataSourcestringAttribution

Get Data mode

Fields vary by dataset. Each row includes dimension codes and resolved names (e.g., area_code + area_name, cat01_code + cat01_name), plus value, unit, and dataSource.

Get Metadata mode

FieldTypeDescription
dimensionIdstringDimension identifier (e.g., cat01, area, time)
dimensionNamestringHuman-readable dimension name
codestringCategory code
namestringHuman-readable name for the code
dataSourcestringAttribution

Python API usage example

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
# Search for population datasets
run = client.actor("rationalistic_counsel/estat-japan-statistics").call(
run_input={
"appId": "YOUR_ESTAT_APP_ID",
"searchMode": "searchDatasets",
"searchWord": "population",
"language": "E",
}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{item['datasetId']} - {item['title']} ({item['governmentOrg']})")

How to get a free e-Stat Application ID

  1. Go to e-Stat and create an account
  2. Log in and go to My Page (マイページ)
  3. Click "API" in the sidebar
  4. Fill in the application form (app name, URL, description)
  5. Click "Issue" -- your Application ID is generated instantly
  6. The API is completely free with no usage fees

How much does it cost to run?

  • Dataset search: 1 API call per 100 datasets, very fast (~$0.01 Apify compute)
  • Data download (1,000 rows): 1 API call, 5 seconds ($0.01 Apify compute)
  • Data download (100,000 rows): 1 API call, 30 seconds ($0.02 Apify compute)
  • Large dataset (1M+ rows): Multiple paginated calls, several minutes (~$0.10 Apify compute)
  • Self-imposed rate limit: 1 second between API calls (respectful usage)

Statistics field codes for filtering

CodeField
01Land and Climate
02Population and Households
03Labor and Wages
04Agriculture, Forestry, and Fisheries
05Mining and Manufacturing
07Business and Enterprise
08Energy and Water
09Construction and Housing
10Transport and Communication
11Commerce and Trade
12Finance and Insurance
13Services
14Government and Elections

Frequently asked questions

Q: What is Japan's official statistics portal? e-Stat (https://www.e-stat.go.jp/) is Japan's official portal for all government statistics, operated by the Statistics Bureau of Japan under the Ministry of Internal Affairs and Communications (MIC).

Q: Is the e-Stat API free? Yes. Registration and API usage are completely free. No credit card required.

Q: Are English datasets available? Yes. Many major datasets have English translations. Use language: "E" to get English output. Not all datasets are translated -- use language: "J" for complete coverage.

Q: How do I find the right dataset ID? Use the searchDatasets mode with keywords. The returned datasetId field can then be used with getStatsData or getMetaInfo modes.

Q: What if I get too much data? Use dimension filters (cdArea, cdCat01, cdTime) to narrow results. Run getMetaInfo first to see available filter codes for your dataset.

Q: How far back does the data go? It varies by dataset. Population Census data goes back to 1920. Most economic indicators are available from 2000 onward.

Q: Can I use this data commercially? Yes. e-Stat data is published under Japan's Government Standard Terms of Use, which is compatible with CC BY 4.0. Commercial use is explicitly permitted with attribution.

Q: What is the difference between e-Stat and RESAS? RESAS (Regional Economy Society Analyzing System) was a separate visualization tool for regional economic data. Its API was discontinued in March 2025. e-Stat remains the primary source for Japanese government statistics.

Q: How do I get population data for Tokyo? Use getStatsData with a Population Census dataset ID and filter by cdArea: "13000" (Tokyo prefecture code).

Q: Why are some values missing or showing '-'? Some statistical cells are suppressed for confidentiality or have no data. The value field may show -, ..., x, or be empty in these cases.

Who uses Japanese government statistics?

  • Market researchers: Analyzing Japanese demographics, consumer behavior, and economic trends
  • Academic researchers: Studying Japanese society, economy, and public policy
  • Financial analysts: Tracking Japanese economic indicators (GDP, CPI, employment)
  • Foreign companies: Evaluating Japan market entry (population density, labor costs, consumer spending)
  • Consulting firms: Building market reports with official Japanese macro data
  • Data journalists: Covering Japan's economy and society with official statistics
  • AI/ML developers: Training models on Japanese demographic and economic data

Integrations

This actor works with all Apify platform features:

  • Schedule runs to check for updated statistics periodically
  • API access to trigger runs programmatically (Python, Node.js, REST API)
  • Webhooks for notifications when data is ready
  • Export to Google Sheets, CSV, JSON, or databases
  • Integrate with LangChain, LlamaIndex, and other AI/LLM frameworks

This actor accesses publicly available data from e-Stat, Japan's official statistics portal operated by the Statistics Bureau of Japan. e-Stat data is published under Japan's Government Standard Terms of Use, which is compatible with CC BY 4.0. Commercial use, redistribution, and modification are permitted with attribution. Each output record includes a dataSource field for compliance.

Required disclaimer: This service uses the API function of the Government Statistics Portal (e-Stat), but the content of the service is not guaranteed by the government.

This actor is not affiliated with or endorsed by the Statistics Bureau of Japan or any Japanese government ministry.