Skip to content

Travel Barometer Index

Travel Barometer Index API returns the index score for the specified {Viewport} within the specified {Location}.

Request

Endpoint

GET /v4/{billing_plan}/account/{account_id}/maps/index/travel_barometer

Path Parameters

Name                       Description Type Examples
*{billing_plan} Billing plan to be applied to the call. string ondemand
*{account_id} Provided identifier of the account. string

Header Parameters

Name                          Description Type Examples                         
*x-api-key Provided API key {x_api_key} that allows authentication. string
*Authorization Provided token {jwt_bearer} that allows authorization. string Bearer {jwt_bearer}

Query Parameters

Name                         Description Type Examples                 Examples
*{Viewport} Viewport identifier. Viewport Viewport
*{Location} Location identifier. Geospatial Area
GeometryID
Circle
*date Day for which index score is requested. date 2021-01-31
network Filter by network. string Dictionary
poi_class Filter POIs with "category": "hotel" by stars rating in the range [1,5]. int 4
poi_category Filter by POI Category. string Dictionary
user_type Filter by reviewer type. string Dictionary
user_country Filter by reviewer's country of origin in ISO 3166-1 alpha-2 standard format (in lower case). string it
de
content_language Filter by contents language in ISO_639-1 standard format. string en
fr
content_type Filter by type of content. string post
review
taggedpost
review && taggedpost
Example
curl -X GET 'https://api.datappeal.io/v4/ondemand/account/{account_id}/maps/index/travel_barometer?country=italy&state=toscana&county=prato&date=2021-07-01&sw_lat=43.06888777416961&sw_lng=8.4375&se_lat=43.06888777416961&se_lng=11.25&ne_lat=45.08903556483103&ne_lng=11.25&nw_lat=45.08903556483103&nw_lng=8.4375' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Response

Status

Status Description
200 Travel Barometer Index data has been successfully returned.

Body

MapsIndex

Field Description Type
tiles Map quads index scores for requested {Viewport} and {Location}. array[MapsIndexDateScore]
MapsIndexDateScore
Field Description Type
*index Index data of corresponding quadkey. LocationIndexDateScore
*quadkey Identifier of the map quad. Quadkey
LocationIndexDateScore
Field Description Type
date Date representing the day score refers to.
It could differ by the requested date for calculation resolution reasons.
date
score Index score value in the range [0,100]. decimal
Quadkey
Field Description Type Examples
*tile Map quad identifier in Bing Maps Tile System standard format. string 1202231311
*wkt Map quad expressed in WKT standard format. string POLYGON ((10.8984375 43.83452678223682, 11.25 43.83452678223682, 11.25 44.087585028245165, 10.8984375 44.087585028245165, 10.8984375 43.83452678223682))
Example
{
    "tiles": [
        {
            "index": {
                "score": 77.57,
                "date": "2021-06-28"
            },
            "quadkey": {
                "tile": "1202231311",
                "wkt": "POLYGON ((10.8984375 43.83452678223682, 11.25 43.83452678223682, 11.25 44.087585028245165, 10.8984375 44.087585028245165, 10.8984375 43.83452678223682))"
            }
        },
        {
            "index": {
                "score": 88.79,
                "date": "2021-06-28"
            },
            "quadkey": {
                "tile": "1202231133",
                "wkt": "POLYGON ((10.8984375 44.087585028245165, 11.25 44.087585028245165, 11.25 44.339565248097124, 10.8984375 44.339565248097124, 10.8984375 44.087585028245165))"
            }
        },
        {
            "index": {
                "score": 84.0,
                "date": "2021-06-28"
            },
            "quadkey": {
                "tile": "1202231313",
                "wkt": "POLYGON ((10.8984375 43.58039085560784, 11.25 43.58039085560784, 11.25 43.83452678223682, 10.8984375 43.83452678223682, 10.8984375 43.58039085560784))"
            }
        }
    ]
}