API

WebAPI outline

Data displayed under “Chart” and “Data” on this website is also published with the REST method WebAPI (Application Programming Interface), which outputs machine readable formats (XML, JSON, CSV, etc).
(The “Chart” and “Data” pages are implemented using the WebAPI.)
There is no requirement to register to use this API so anyone can use it. (Please check Terms of Use before using it.)

Construction of data that can be acquired

Data that can be acquired from this API is organized in 3D by each indicator as shown in the diagrams below.
Approximately 5,000 indicators are held and each indicator has a “Time” axis and a “Region” axis.
There are also some indicators with no monthly data or quarterly data for the “Time” axis and no country data or city data for the “Region” axis (not studied), depending on the indicator.
(Please refer to Provided_data_list for details.)
To uniquely determine a value, the “Indicator”, “Time” and “Region” must be decided.
(Deciding on “Indicator” and “Region” will produce a time series chart, while deciding on “Indicator” and “Time” will produce a by region chart.)


Data structure commentary

“Indicators” are subdivided based on their “Data cycle”, “Regional rank” and “Original/Seasonally adjusted value” as shown in the table below.
This is referred to as “Indicator element”. The source (referenced original statistical survey) and annotation differ depending on each “Indicator element” and even the units within the “Indicator” may differ.


Indicator
name
Indicator code Data cycle Regional rank Original and seasonal adjusted value Indicator element code Source Unit
Employed
persons (Male)
0301010001010010010 Month Nationwide (Japan) Original figures 0301010001010010010010201 Labour Force Survey 10 thousand persons
Seasonally adjusted figures 0301010001010010010010202 Labour Force Survey 10 thousand persons
Quarter Nationwide (Japan) Original figures 0301010001010010010020201 Labour Force Survey 10 thousand persons
Year Nationwide (Japan) Original figures 0301010001010010010030201 Labour Force Survey 10 thousand persons
Country Original figures 0301010001010010010030101 ILOSTAT 1,000 persons
Fiscal year Nationwide (Japan) Original figures 0301010001010010010040201 Labour Force Survey 10 thousand persons
Number of
dwellings
0801010100000010000 Year Nationwide (Japan) Original figures 0801010100000010000030201 Housing and Land Survey number of dwelling units
Prefecture Original figures 0801010100000010000030301 SSDS number of dwelling units
City Original figures 0801010100000010000030401 SSDS number of dwelling units

[Explanation of indicator element code]
First 19 digits = Same as indicator code
Digits 20~21 = Data cycle (01: Month, 02: Quarter, 03: Calendar year, 04: Fiscal year)
Digits 22~23 = Regional rank (01: Country, 02: Nationwide (Japan), 03: Prefecture, 04: City)
Digits 24~25 = Original and seasonal adjusted value (01: Original figures, 02: Seasonally adjusted figures)
※Please refer to Indicator_code_system.xlsx for details.


A relationship diagram for “Indicator”, “Indicator element” and “Data” is shown below.


Relationship diagram of series data

The above table shows specific examples of “Indicator” and “Indicator element”. Specific examples for “Data” are shown below.


(Indicator element name) Indicator element code Region Time Value
Number of dwellings
[Calendar year, Nationwide (Japan),
Original figures]
0801010100000010000030201 Nationwide (Japan) 1948 13,907,024
0801010100000010000030201 Nationwide (Japan) 1958 17,934,000
0801010100000010000030201 Nationwide (Japan) 2013 60,628,600
Number of dwellings
[Calendar year, Prefecture,
Original figures]
0801010100000010000030301 Hokkaido 1978 1,744,500
0801010100000010000030301 Hokkaido 1983 1,923,800
0801010100000010000030301 Hokkaido 2013 2,746,600
0801010100000010000030301 Aomori-ken 1978 411,400
0801010100000010000030301 Aomori-ken 1983 444,900
0801010100000010000030301 Aomori-ken 2013 586,300
0801010100000010000030301 Okinawa-ken 1978 303,000
0801010100000010000030301 Okinawa-ken 1983 338,200
0801010100000010000030301 Okinawa-ken 2013 602,800

How to use WebAPI

This API provides the 6 functions shown in the table below.


No. Function name Outline
Statistics meta information (indicator) acquisition Searches and acquires information relating to the “Indicator” based on the specified category and statistical survey name.
Statistics meta information (region) acquisition Searches and acquires information relating to the “Region” based on the region name and region code.
Statistics meta information (term) acquisition Searches and acquires information relating to the “Term” based on the specified category and free word.
Statistics meta information (social event) acquisition Searches and acquires information relating to the “Social event” based on the specified category and when it occurred.
Statistics meta information (statistical survey) acquisition Searches and acquires information relating to the “Statistical survey” based on the specified indicator and free word.
Statistics data acquisition Searches and acquired statistics data based on the indicator code, region, time, etc.

As a basic method of use, first ① Search for the “Indicator code” you want to acquire using “Statistics meta information (indicator) acquisition” and then ⑥ Specify the “Indicator code” in the search conditions using “Statistics data acquisition” and then acquire information for the indicator.
(②③④ and ⑤ can be acquired independently as auxiliary information. These functions are not necessary if only data is required.)
For a specific method of use, you can link the “Parameter” used for the search conditions in the [Base URL] (see the following "WebAPI detailed specifications") using "&" and then acquire the intended data by sending a HTTP request (GET).
Name and value are combined using “=” for each parameter as in “Parameter name=value”. When specifying multiple parameters, please combine each parameter specification using “&” as in “Parameter name=value&Parameter name=value&...”.
Also, parameter values must be URL encoded (character code UTF-8) before combining.


WebAPI detailed specifications

Each base URL, search condition parameters, results response field, etc., for the 6 functions of this API are shown in the table below.
Also, the public format of data that can be acquired is the [XML, JSON, CSV] format. (For ⑥ “Statistics data acquisition” JSON, the [JSON-stat] format specialized to provide statistics data is also published.).


No. Function name Public format Base URL Parameters/response Output sample
Statistics meta information (indicator) acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getIndicatorInfo? API_Parameters_Response_1_Meta_information(indicator).xlsx
(Download)
API_Parameters_Response_1_Meta_information(indicator).pdf
(Download)
Acquire statistical meta information (series)(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getIndicatorInfo? Acquire statistical meta information (series)(Json)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getIndicatorInfo? Acquire statistical meta information (series)(Csv)(Download)
Statistics meta information (region) acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getRegionInfo? API_Parameters_Response_2_Meta_information(region).xlsx
(Download)
API_Parameters_Response_2_Meta_information(region).pdf
(Download)
Get statistical meta information (area)(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getRegionInfo? Get statistical meta information (area)(Json)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getRegionInfo? Get statistical meta information (area)(Csv)(Download)
Statistics meta information (term) acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getTermInfo? API_Parameters_Response_3_Meta_information(term).xlsx
(Download)
API_Parameters_Response_3_Meta_information(term).pdf
(Download)
Acquire statistical meta information (term)(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getTermInfo? Acquire statistical meta information (term)(Json)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getTermInfo? Acquire statistical meta information (term)(Csv)(Download)
Statistics meta information (social event) acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getSocialEventInfo? API_Parameters_Response_4_Meta_information(social_event).xlsx
(Download)
API_Parameters_Response_4_Meta_information(social_event).pdf
(Download)
Statistics meta information (social event) acquisition(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getSocialEventInfo? Statistics meta information (social event) acquisition(Json)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getSocialEventInfo? Statistics meta information (social event) acquisition(Csv)(Download)
Statistics meta information (statistical survey) acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getStatInfo? API_Parameters_Response_5_Meta_information(statistical_survey).xlsx
(Download)
API_Parameters_Response_5_Meta_information(statistical_survey).pdf
(Download)
Statistics meta information (statistical survey) acquisition(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getStatInfo? Statistics meta information (statistical survey) acquisition(Json)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getStatInfo? Statistics meta information (statistical survey) acquisition(Csv)(Download)
Statistics data acquisition XML https://dashboard.e-stat.go.jp/api/1.0/Xml/getData? API_Parameters_Response_6_Data.xlsx
(Download)
API_Parameters_Response_6_Data.pdf
(Download)
Statistics data acquisition(Xml)(Download)
JSON https://dashboard.e-stat.go.jp/api/1.0/Json/getData? Statistics data acquisition(Json)(Download)
JSON-stat https://dashboard.e-stat.go.jp/api/1.0/JsonStat/getData? Statistics data acquisition(JsonStat)(Download)
CSV https://dashboard.e-stat.go.jp/api/1.0/Csv/getData? Statistics data acquisition(Csv)(Download)
*Supports CORS (Cross Origin Resource Sharing)
  The request URL for [JSON] and [JSON-stat] in the above table support Cross Origin Resource Sharing (CORS).
  If the browser supports XMLHttpRequest (Level 2), it is possible to send cross domain using XMLHttpRequest.
(Bundled version) (Process results code list)
API_Parameters_Response_Bundled_version.xlsx
(Download)
API_Parameters_Response_Bundled_version.pdf
(Download)
API_Process_results_code_list.xlsx
(Download)
API_Process_results_code_list.pdf
(Download)

Important points

・There is no requirement to register to use this API so anyone can use it. However, please adhere to the Terms of Use and use it.
・Please use it after checking the API specifications listed on this page.
・If you have published a service using this API, please display the following credit.
“This service uses the API feature of Statistics Dashboard, but the contents of this service are not guaranteed by the Statistics Bureau of Japan.”
(There is no designation of the place to display, if the users can refer to it.)
・Please do not perform any act against the statute of law for laws, regulations and ordinance or perform an act that solicits or promotes such action.
・Please do not post false information to the content and do not perform any act to deceive the people who view the website.
・Please do not perform any act that will hinder the operation of this API, the network and system by such as creating a large access volume in a short time period.
・When performing system inspections and maintenance work involving the API, we may stop or suspend all or part of the API.
・Please understand in advance that some applications that previously used the API may not continue to work after the API specifications are updated.