An error occured. Details Hide
You have unsaved pages. Restore Cancel

Get data

This endpoint returns observation data for the given filter.

Input

Simple Request

Input is a list of datasetId and timeseries key.

Name TypeDescription  
DatasetId
 
String Unique dataset identifier
TimerseriesKey Int Timeseries key.

 Full Request

Name Type Description
TimeSeries TimeseriesDescriptor The TimeseriesDescriptor contains
  1. datasetIds : Unique datasetId
  2. TimeseriesKeys : Timeseies key
StartDate Date Timeseries start date
Enddate Date Timeseries end date
Frequency Char Frequency of Data required( A= Annual ;S=SemiAnnually; Q=Quarterly; W=Weekly; D=Daily)
CustomFields Bool Includes additional dimensional metadata associated with each dimension as part of output

 Result 

Array of Observation Data

Name Type Description
dataset String Unique identifier for a dataset
id Int Timeseries key
metadata Array[DimensionalDetails] List of Dimension details.
Consist of
  • dim:Dimension id
  • key: Dimension member key(The dimension member key associated with this timeseries)
  • name: Dimension member name.
  • RegionId: Region code for the member of geographical dimension
startDate Date First Observation value's date.
endDate Date Most recent observation value's date.
scaleValue Int The default scale value. "data" needs to be multiplied by this value to obtain absolute observation data value.
unit String Unit of output data
frequency Char Denotes the frequency of data available.
Frequency of data can be of the following types
  1. annual
  2. semiannual
  3. quarterly
  4. monthly 
  5. weekly   
  6. daily
data Array[double] Observation values with the first value corresponding to the startdate and the last value corresponding to endDate.
null values can be present and correspond to missing data.

Example

Simple Request
POST: http://knoema.com/api/1.0/data/get
 
[
   {
      "TimeseriesKey": 1000000,
      "DatasetId": "CDIACTACHIINDUSAA"
   },
   {
      "TimeseriesKey": 1000020,
      "DatasetId": "CDIACTACHIINDUSAA"
   }
]
 
Result:
 
[
   {
      "dataset": "CDIACTACHIINDUSAA",
      "id": 1000000,
      "metadata": [
         {
            "dim": "Location",
            "key": 1000000,
            "name": "China",
            "RegionId": "CN"
         },
         {
            "dim": "Variable",
            "key": 1000000,
            "name": "anomalies",
            "Definition": null
         }
      ],
      "startDate": "Tue, 01 Jan 1901 00:00:00 GMT",
      "endDate": "Thu, 01 Jan 1998 00:00:00 GMT",
      "scaleValue": 1,
      "unit": "deg C",
      "frequency": "annual",
      "data": [
         0,
         0.77,
         0.36,
         -0.02,
         -0.2,
         1.21
      ]
   },
   {
      "dataset": "CDIACTACHIINDUSAA",
      "id": 1000020,
      "metadata": [
         {
            "dim": "Location",
            "key": 1000010,
            "name": "India",
            "RegionId": "IN"
         },
         {
            "dim": "Variable",
            "key": 1000010,
            "name": "smoothed anomalies",
            "Definition": null
         }
      ],
      "startDate": "Tue, 01 Jan 1901 00:00:00 GMT",
      "endDate": "Thu, 01 Jan 1998 00:00:00 GMT",
      "scaleValue": 1,
      "unit": "deg C",
      "frequency": "annual",
      "data": [
         0.02,
         -0.09,
         -0.15,
         -0.25,
         -0.31,
         -0.32,
         0.31
      ]
   }
]
Full Request
 
{
    Timeseries: [
        {
            TimeseriesKey: 1000000,
            DatasetId: "UNFAOTS2010Nov"
        },
        {
            TimeseriesKey: 1000010,
            DatasetId: "UNFAOTS2010Nov"
        }
    ],
    StartDate: "01/01/1991",
    EndDate: "01/01/2008",
    Frequency: "A",
    CustomFields: true
}
 
 
Result:
 
[
   {
      "dataset": "UNFAOTS2010Nov",
      "id": 1000000,
      "metadata": [
         {
            "dim": "Country",
            "key": 1000100,
            "name": "Austria",
            "RegionId": "AT"
         },
         {
            "dim": "Item",
            "key": 1006260,
            "name": "Natural Rubber + (Total)",
            "Group Name": null,
            "Definition": null
         },
         {
            "dim": "Element",
            "key": 1000020,
            "name": "Export Quantity"
         }
      ],
      "startDate": "Tue, 01 Jan 1991 00:00:00 GMT",
      "endDate": "Tue, 01 Jan 2008 00:00:00 GMT",
      "scaleValue": 1,
      "unit": "tonnes",
      "frequency": "annual",
      "data": [
         155,
         156,
         289,
         335,
         221,
         220,
         397,
         459,
         421,
         565,
         346,
         588,
         503,
         754,
         845,
         1759,
         2308,
         969
      ]
   },
   {
      "dataset": "UNFAOTS2010Nov",
      "id": 1000010,
      "metadata": [
         {
            "dim": "Country",
            "key": 1000240,
            "name": "Bosnia and Herzegovina",
            "RegionId": "BA"
         },
         {
            "dim": "Item",
            "key": 1006230,
            "name": "Milk Equivalent + (Total)",
            "Group Name": null,
            "Definition": null
         },
         {
            "dim": "Element",
            "key": 1000020,
            "name": "Export Quantity"
         }
      ],
      "startDate": "Wed, 01 Jan 1992 00:00:00 GMT",
      "endDate": "Tue, 01 Jan 2008 00:00:00 GMT",
      "scaleValue": 1,
      "unit": "tonnes",
      "frequency": "annual",
      "data": [
         1000,
         600,
         0,
         0,
         2800,
         2600,
         1000,
         4000,
         2000,
         600,
         825,
         2223,
         11120,
         22202,
         28381,
         42204,
         51461
      ]
   }
]