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…

 

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…

 

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…

 

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.