Popularity Compare
Popularity Compare API returns two different index scores at once for specified {Viewport} and {Location}: one defined by the specifieddate query parameter and another defined by compare_ prefixed query parameters (or auto-calculated with default values where specified).
Additional comparative data between the two index scores is returned as well.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/maps/index/popularity/compare
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 | Default |
|---|---|---|---|---|
| *{Viewport} | Viewport identifier. | Viewport | Viewport | |
| *{Location} | Actual location identifier. | Geospatial | AreaGeometryIDCircle | |
| *from | Start date of timeframe. | date | 2020-01-01 | |
| *to | End date of timeframe. | date | 2020-12-31 | |
| compare_from | Start date of comparison timeframe. | date | 2020-07-01 | One year before from. |
| compare_to | End date of comparison timeframe. | date | 2021-01-01 | One year before to. |
| ⓝ networkⓝ compare_network | Filter by network. | string | Dictionary | |
| ⓝ poi_classⓝ compare_poi_class | Filter POIs with "category": "hotel" by stars rating in the range [1,5]. |
int | 4 | |
| ⓝ poi_industryⓝ compare_poi_industry | Filter by POI Industry. | string | Dictionary | |
| ⓝ poi_categoryⓝ compare_poi_category | Filter by POI Category. | string | Dictionary | |
| ⓝ user_typeⓝ compare_user_type | Filter by reviewer type. | string | Dictionary | |
| ⓝ user_countryⓝ compare_user_country | Filter by reviewer's country of origin in ISO 3166-1 alpha-2 standard format (in lower case). | string | itde | |
| ⓝ content_languageⓝ compare_content_language | Filter by contents language in ISO_639-1 standard format. | string | enfr |
Example
curl -X GET 'https://api.datappeal.io/v4/ondemand/account/{account_id}/maps/index/popularity/compare?country=italy&from=2025-01-01&to=2025-10-31&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 | Popularity Compare data has been successfully returned. |
Body
MapsComparedIndex
| Field | Description | Type |
|---|---|---|
| actual | Map quads index scores for the actual timeframe. | MapsComparableIndex |
| comparison | Map quads index scores for the comparison timeframe. | MapsComparableIndex |
| variation | Calculated difference between actual and comparison. |
array[MapsIndexVariation] |
MapsComparableIndex
| Field | Description | Type |
|---|---|---|
| timeframe | Reference date range. | Timeframe |
| value | Map quads index scores for the corresponding timeframe. |
array[MapsIndexDateScore] |
Timeframe
| Field | Description | Type |
|---|---|---|
| *from | Start date of timeframe. | date |
| *to | End date of timeframe. | date |
MapsIndexDateScore
| Field | Description | Type |
|---|---|---|
| *score | Index score of corresponding quadkey. |
decimal |
| *quadkey | Identifier of the map quad. | Quadkey |
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)) |
MapsIndexVariation
| Field | Description | Type |
|---|---|---|
| *index | Index score variation of corresponding quadkey. |
Variation |
| *quadkey | Identifier of the map quad. | Quadkey |
Variation
| Field | Description | Type | Examples |
|---|---|---|---|
| value | Difference between actual value and comparison value. |
decimal | 1.12 |
| variation | The explicit variation polarity. It is null when values are not available in both timeframes. |
string | POSITIVE NEUTRAL NEGATIVE |
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
{
"actual": {
"timeframe": {
"from": "2025-01-01",
"to": "2025-10-31"
},
"value": [
{
"score": 77.57,
"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))"
}
},
{
"score": 88.79,
"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))"
}
},
{
"score": 84.0,
"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))"
}
}
]
},
"comparison": {
"timeframe": {
"from": "2024-01-01",
"to": "2024-10-31"
},
"value": [
{
"score": 65.68,
"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))"
}
},
{
"score": 94.47,
"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))"
}
},
{
"score": 50.64,
"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))"
}
}
]
},
"variation": [
{
"index": {
"value": 11.89,
"variation": "POSITIVE"
},
"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": {
"value": -5.68,
"variation": "NEGATIVE"
},
"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": {
"value": 33.36,
"variation": "POSITIVE"
},
"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))"
}
}
]
}