1. Top Page
  2. Overview
  3. API Specifications

API Specifications

See below for the details of API specifications.

API Specifications (Released on 2019年7月26日) new

The specification is to provide statistical data in XML, JSON, and CSV formats.(Word / PDF / HTML)(Japanese Only)

version: 3.0
Hostname: api.e-stat.go.jp
Request URL: http://api.e-stat.go.jp/rest/3.0/app...

1. Added the ability to retrieve data in CSV format.

・Added the ability to retrieve data in CSV format to the statistical table information retrieval function and meta information retrieval function.

2. Add aggregate region categories

・Added a parameter called "collectArea" to specify the aggregate region category, as well as the output of the aggregate region category.

3. Add description of the statistical table, provided statistics, provided classifications, and metadata.

・Added a parameter "explanationGetFlg" to specify whether or not to get an explanation for the statistical table, provided statistics, provided classification and metadata, and an output of the explanation.

4. Add annotations to statistical data

・Added a parameter "annotationGetFlg" to specify whether or not to get annotation information in the statistical data acquisition function and the statistical data bulk acquisition function, and we have also added the output of annotations.

5. The provision of the System of Social and Demographic Statistics will be discontinued from the search data type.

・The search data type "3: System of Social and Demographic Statistics (Regional Statistics Database)" is not required to obtain statistical table information for the System of Social and Demographic Statistics in the search data type parameter "searchKind" of the statistical table information acquisition function. Therefore, the search data type was discontinued.
Note: 1. Statistical information and 2. Small area and regional mesh are still available.

API Specifications (Released on 2016年7月14日)

The specification is to provide statistical data in XML, JSON, and CSV formats.(Word / PDF / HTML)(Japanese Only)

version: 2.1
Hostname: api.e-stat.go.jp
Request URL: http://api.e-stat.go.jp/rest/2.1/app...

1. Added a function to obtain statistical data in CSV format.

・Added the ability to download statistical data in CSV format to the statistical data acquisition function.

2. Addition of statistical data bulk acquisition function

・Added a function that allows you to acquire multiple statistical data at once.

3. Added a tag that splits and outputs the provider category name and statistical table name in the statistical table information for each function.

・Added the STATISTICS_NAME_SPEC and TITLE_SPEC tags.

API Specifications (Released on 2015年1月30日)

The specification is to provide statistical data in XML, JSON, and CSV formats.(Word / PDF / HTML)(Japanese Only)

version: 2.0
Hostname: api.e-stat.go.jp
Request URL: http://api.e-stat.go.jp/rest/2.0/app...

1. Added data catalog information retrieval function

・Added a new feature that allows you to get a list of all statistical data (including Excel) provided on e-Stat through an API. The list includes information such as the survey name, title, and link information.

2. All API functions are now available in JSON format.

・The JSON format is now supported for all API functions, which were previously only implemented for the statistical data acquisition function.

3. Added functions such as providing update information for statistical table information acquisition.

・Added a parameter "updatedDate" to specify the update date for the statistical table information acquisition function.

・Added the operator "NOT" to the parameter "searchWord.searchKeyword".
【Parameter Example】
Note: Please URL-encode all characters you specify.
・To search statistics that do not include "Public Internals" in the "School Basic Survey"
searchWord=Basic School Survey NOT Public Schools
・If you want to search for statistics that do not include "Public School Breakdown" and "National, Public and Private [Total]" in the "Basic School Survey"
searchWord=Basic School Survey NOT (Public School Composition OR National, Public, and Private Schools [Total])

  • 4. Fix some of the output data, such as unifying the output tags of the statistical table information for each function.

・Unified the "Statistical Table Information.TABLE_INF tag" in the statistical table information retrieval, metadata retrieval, statistical data retrieval, and dataset reference functions. Please refer to Table 1 for more details.

・Added the MAIN_CATEGORY tag, SUB_CATEGORY tag, OVERALL_TOTAL_NUMBER tag and UPDATED_DATE tag to the TABLE_INF tag of the statistical table information for each function.

・Changed the LIST_INF tag to TABLE_INF tag for obtaining statistical table information.

・Changed the LIST_INF tag to the DATASET_INF tag for the dataset reference.

・Added the RESULT_INF tag to the statistical table information retrieval and statistical data retrieval.
【Output information for the RESULT_INF tag】
Statistical table information retrieval: FROM_NUMBER tag, TO_NUMBER tag and NEXT_KEY tag
Statistical data retrieval: TOTAL_NUMBER tag, FROM_NUMBER tag, TO_NUMBER tag and NEXT_KEY tag

Table 1:4. About the TABLE_INF tag of statistical table information for each function

Tag Version 1.0 Version
2.0
Statistical table information
retrieval
Meta information
retrieval
Statistical data
retrieval
Dataset
reference
STAT_NAME くろまる くろまる くろまる くろまる くろまる
GOV_ORG くろまる くろまる くろまる くろまる くろまる
STATISTICS_NAME くろまる くろまる くろまる くろまる くろまる
TITLE くろまる くろまる くろまる くろまる くろまる
CYCLE くろまる くろまる
SURVEY_DATE くろまる くろまる くろまる くろまる
OPEN_DATE くろまる くろまる
SMALL_AREA くろまる くろまる
MAIN_CATEGORY くろまる
SUB_CATEGORY くろまる
OVERALL_TOTAL_NUMBER くろまる
UPDATED_DATE くろまる

API Specifications (Released on 2014年10月31日)

The specification is to provide statistical data in XML and JSON formats(Word / PDF)(Japanese Only)

Version 1.0
Hostname: api.e-stat.go.jp
Request URL: http://api.e-stat.go.jp/rest/1.0/app...

Reduction of communication volume by gzip compression

The response for each request URL in the API is compressed in gzip format.
Getting API responses in gzip format can reduce the amount of data transferred, which can lead to faster processing. To receive a gzip-compressed API response, you need to set the HTTP request header (the "Accept-Encoding" header) to "gzip" and request the API.
Note: gzip-compressed API responses need to be decompressed separately.

(Setting for HTTP request header) Accept-Encoding: gzip

Cross-Origin Resource Sharing (CORS) support

The following request URLs of the API support Cross-Origin Resource Sharing (CORS).
Therefore, if you are using a browser that supports XMLHttpRequset (Level 2), you can use XMLHttpRequest to communicate with other domains.

Supported Request URL: http://api.e-stat.go.jp/rest/<version>/app/json/...

https support

As of January 4, all versions of the API function (1.0, 2.0, 2.1, and 3.0) are now available via "https".
Note: "http" requests are still available.