Skip to main content

Account API

Users can retrieve their usage statistics via meteoblue account API. The API delivers a paginated JSON. The basic URL has the following form:

http://my.meteoblue.com/account/usage?apikey=DEMOKEY

Parameters

Mandatory Parameters:

ParameterDescriptionExample
apikeyYour personal API key&apikey=DEMOKEY

Optional Parameters:

ParameterDescriptionExampleDefault
date_startStart date of the usage statistics in the form yyyy-mm-dd&date_start=2018-06-20none
date_endEnd date of the usage statistics in the form yyyy-mm-dd&date_end=2018-09-30none
typeShow usage for a specific datafeed&type=job_countnone
perPagination: How many entries are displayed per page (min value: 1)&per=2010
pagePagination: The page to be displayed (min value: 1, max value: the number of pages)&page=21

Example: http://my.meteoblue.com/account/usage?date_start=2020-01-01&date_end=2020-01-14&apikey=DEMOKEY

Output

The Account-API only supports the JSON-Format. The JSON contains a field data with an array containing the usage statistics, and a field page with information about the pagination.

The data-array contains an entry for each date and datafeed. If you called the basic-day-package for three different locations on a single day, it will be shown as one entry. If you then call sunmoon-package on the same day, it will be listed as a separate entry.

An example output might look like this:

{
"data": [
{
"request_count": 96,
"request_date": "2019-09-19",
"request_type": "dataset-query-datapoints"
},
{
"request_count": 2,
"request_date": "2019-09-19",
"request_type": "dataset-query-count"
},
{
"request_count": 61320,
"request_date": "2019-09-18",
"request_type": "dataset-query-datapoints"
},
{
"request_count": 7,
"request_date": "2019-09-18",
"request_type": "dataset-query-count"
},
{
"request_count": 2053423008,
"request_date": "2019-09-17",
"request_type": "dataset-job-datapoints"
},
{
"request_count": 7,
"request_date": "2019-09-17",
"request_type": "dataset-job-count"
}
],
"page": {
"position": {
"current": 1,
"max": 1
},
"data": {
"per": 10,
"total": 6
}
}
}

For each data row, the following attributes are returned:

VariableDescription
request_countHow often this call was accounted on the given date
request_dateThe date when the calls were made
request_typeThe type of the call, ie "basic-day"

The page field is divided into two parts: The field page.position contains the variables "current", "next" and "max". The field page.data contains the variables "per" and "total".

The following table gives an overview over the page-field:

VariableDescription
position.currentThe current page
position.nextThe date when the call was made. If there is no next page, this field is omitted.
data.perHow much entries are displayed in the data-array
data.totalThe total amount of data-entries available