How to Retrieve Time Series Using the API Interface
The API provides a set of commands that can be used to retrieve a list of series subjects and sub-topics, and another set of commands that enables users to obtain data for each series.
General Parameters
These are parameters that can be added in general to API queries in order to define the format, language, number of objects per page, and so on.
Parameter |
Type |
Explanation |
Default |
Required parameter |
lang | he/en | Language types (Hebrew/English) | he | – |
format | xml/json/csv/xls | Format type | Depends on type of browser; defining the desired format is recommended | Desired |
download | true/false | Defines whether the data will be downloaded as a physical file (true) or shown in the browser (false) | Depends on format and type of browser; defining the desired characteristic is recommended | Desired |
page | number | Number of current page (current_page) | 1 | – |
pagesize | number | Number of objects that will appear on the page (page_size); maximum: 1,000 | 100 | – |
Table of Contents
Retrieving series subjects
Retrieving series data
To Retrieve Series Subjects
The list of series subjects is divided into five levels, each of which contains the subtopics of the level above it. In other words, the first level contains the main subjects, the second level contains the subtopics of the first level, and so on.
List of subjects by level
List of subjects by path
List of subjects by level
Template
https://apis.cbs.gov.il/series/catalog/level
Parameters
Parameter |
Type |
Explanation |
Default |
Required parameter |
id | LX | Level number | – | V |
subject | number | First level code | – | V – from Level 2 onward |
Examples
List of Subjects by Path
Template
https://apis.cbs.gov.il/series/catalog/path
Parameters
Parameter |
Type |
Explanation |
Default |
Required parameter |
id | L1, L2, L3, L4, L5 | Level subject code | – | V |
Examples
Retrieving series data
Data by series codes
Data by path
Data by series codes
Template
https://apis.cbs.gov.il/series/data/list
Parameters
Parameter |
Type |
Explanation |
Default |
Required parameter |
id | number | Series code(s) | – | V |
startPeriod | mm-yyyy | From date | 01-1900 | X |
endPeriod | mm-yyyy | To date | 01-2100 | X |
last | number>0 | Number of objects to retrieve from one or more series, starting with the most updated and onward | all | X |
addNull | true/false | Including empty values or not | true | X |
data_hide | true/false | To hide the data and leave only the metadata (information about the data) | false | X |
Examples
Data by Path
Template
https://apis.cbs.gov.il/series/data/path
Parameters
Parameter |
Type |
Explanation |
Default |
Required parameter |
id | L1, L2, L3, L4, L5 | Level subjects code | – | V |
startPeriod | mm-yyyy | From date | 01-1900 | X |
endPeriod | mm-yyyy | To date | 01-2100 | X |
time | number | specific time unit | all | X |
data | number | specific data type | all | X |
price | number | specific price type | all | X |
calc | number | specific calculation type | all | X |
unit | number | specific unit of measurement | all | X |
last | number>0 | number of objects to be retrieved from one or more series, starting with the most up-to-date values and onward | all | X |
addNull | true/false | including empty values or not | true | X |
data_hide | true/false | hide the data and leave only the metadata (information about the data) | false | X |
Examples
To retrieve data from one or more series that matches a particular path |
https://apis.cbs.gov.il/series/data/path?id=2,1,1,2,379&format=xml&download=false&lang=en |
To retrieve meta-data for one or more series whose first-level subject code is 2 |
https://apis.cbs.gov.il/series/data/path?id=2&data_hide=true&format=xml&download=false&lang=en |
To retrieve data from one or more series in the specific path in a time unit of a year |
https://apis.cbs.gov.il/series/data/path?id=2,1,1,2,379&time=1&format=xml&download=false&lang=en |
To retrieve data from one or more series on specific dates in the specific path |
https://apis.cbs.gov.il/series/data/path?id=2,1,1,2,379&startperiod=01-2000&endperiod=12-2020&format=xml&download=false&lang=en |
To retrieve the two most recent (the most recently updated) data of one or more series in a specific path |
https://apis.cbs.gov.il/series/data/path?id=2,1,1,2,379&last=2&format=xml&download=false&lang=en |