OrbTop

e-Stat Japan Statistics Scraper

BUSINESSOTHER

e-Stat Japan Statistics Scraper

Extract official Japanese government statistics from the e-Stat API. Search 6,000+ datasets covering population, GDP, trade, employment, and more. Returns bilingual JP/EN labels with automatic wareki-to-Gregorian date conversion.

What is e-Stat?

e-Stat is Japan's unified government statistics portal, operated by the Ministry of Internal Affairs and Communications. It aggregates statistical data from all major Japanese ministries and agencies. The e-Stat API v3 provides programmatic access to 6,000+ survey tables covering:

  • Population: Census, vital statistics, household surveys
  • Economy: GDP, industrial production, corporate statistics
  • Labour: Employment, wages, working hours
  • Agriculture: Crop production, livestock, fisheries
  • Trade: Import/export by commodity and country
  • Health & Education: Medical facilities, school enrollment

Getting Started

  1. Register for a free API key at https://www.e-stat.go.jp/api/
  2. Enter your appId in the actor input
  3. Choose a mode: catalog to search tables, data to fetch records

Modes

Catalog Mode (mode: "catalog")

Search the statistical table index by keyword, subject area, or publishing ministry. Returns metadata for matching tables — use this to discover statsDataId values for data mode.

Input example:

{
  "appId": "YOUR_APP_ID",
  "mode": "catalog",
  "searchWord": "population",
  "lang": "E",
  "maxItems": 50
}

Output fields:

Field Description
stats_data_id Unique e-Stat table ID (use in data mode)
stats_name Survey series name
statistics_name Specific table name within the survey
title Full table title
government_org Publishing ministry or agency
cycle Survey frequency (annual/monthly/etc.)
survey_date Survey period code
open_date Publication date (YYYY-MM-DD)
small_area True if municipality-level data is available
overall_total Total number of data cells in the table

Data Mode (mode: "data")

Fetch actual data cells from one or more specific table IDs. Supports multi-dimensional data with area, time, and category axes.

Input example:

{
  "appId": "YOUR_APP_ID",
  "mode": "data",
  "statsDataIds": ["0003448237"],
  "lang": "E",
  "maxItems": 1000
}

Output fields:

Field Description
stats_data_id Source table ID
area_code JIS prefecture/municipality code
area_label Area name (Japanese)
area_label_en Area name (English)
time_code Time dimension code
time_label Time label as reported (may include wareki)
time_gregorian ISO 8601 normalized year (wareki converted)
cat01_code Category dimension 1 code
cat01_label Category dimension 1 label
value Numeric data value
unit Measurement unit
annotation Suppression flag (* or -)

Filtering Options

Catalog Mode Filters

Input Description Example
searchWord Keyword search across JP and EN metadata "population"
statsField Subject area code "02" (Population)
governmentOrg Ministry code "00200" (Statistics Bureau)
lang Label language: "E" (English) or "J" (Japanese) "E"

Common statsField Codes

Code Subject Area
02 Population / Households
03 Labour / Wages
04 Agriculture / Forestry / Fisheries
05 Mining / Industry / Construction
07 Trade
08 Finance / Insurance
09 Government Finance
13 Health / Social Security
14 Education / Culture

Wareki Date Conversion

Japanese government data frequently uses imperial era years (令和, 平成, 昭和, 大正). This actor automatically converts them to Gregorian years in the time_gregorian field:

Japanese Gregorian Offset Example
令和 (Reiwa) +2018 令和6 → 2024
平成 (Heisei) +1988 平成30 → 2018
昭和 (Showa) +1925 昭和50 → 1975
大正 (Taisho) +1911 大正5 → 1916

Rate Limits

The e-Stat API free tier allows up to 100,000 requests per day with no monthly limit. The actor uses a conservative 200ms delay between requests to stay well within limits.

Large Tables

Some e-Stat tables contain millions of data cells. Use maxItems to limit output:

  • Catalog mode: up to 100,000 table entries per search
  • Data mode: no hard per-table cap, but use maxItems for manageable runs

Output Format

All records are flat JSON objects. Unused dimension fields (e.g. cat02_* when a table only has one category dimension) are omitted from output.

Example Use Cases

  • Track Japan's annual population by prefecture over time
  • Monitor labour market statistics (unemployment, wages) by industry
  • Analyze agricultural production trends
  • Research bilateral trade flows by commodity
  • Study historical demographic data with wareki-to-Gregorian conversion