REST API

get
Get crowd entries

https://avoid-crowds.dev/api/crowds
This endpoint allows you to get crowd entries.
Request
Response
Headers
Authentication
required
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}
Query Parameters
include
optional
string
Include your region to access crowd entries for that region. An overview of regions can be found under 'additional information'. Single available value: region
sort
optional
string
The sort query parameter is used to determine by which property the results collection will be ordered. Sorting is ascending by default. Adding a hyphen (-) to the start of the property name will reverse the results collection. In case of sorting by multiple fields, you can write the fields in string format, separated by comma without spaces. Available fields for sorting: date avoid_crowds_score total_cruise_passengers total_cruise_crew local_public_holiday
fields[crowds]
optional
string
Sometimes you'll want to fetch only a couple fields to reduce the overall size of your SQL query. This can be done using the fields query parameter. In case of getting multiple fields, write fields in string format, separated by comma without space after the comma. Available fields for sorting: id title description date avoid_crowds_score total_cruise_passengers total_cruise_crew ships_in_port local_public_holiday local_school_vacation local_events vacations
filter
optional
array
The filter query parameters can be used to filter results by partial property value, exact property value or if a property value exists in a given array of values. There are a lot of flexible filters for crowds below.
filter[date]
optional
string
Get entries for dates in many different ways. Format of date: Y-m-d (For example, 2019-05-25) + (equal to tomorrow) - (equal to yesterday) ago first next last this yesterday today tomorrow Some date parameter examples: next wednesday last friday this thursday
filter[days_before]
optional
string
Get entries before current day. Format of date is the same as for filter[date]
filter[days_after]
optional
string
Get entries after current day. Format of date is the same as for filter[date]
filter[days_between]
optional
string
Get entries between two days. Format of dates is the same as for filter[date]. Two dates must be separated by comma without space after comma. Example: today,next Friday
filter[region]
optional
string
Filterting entries by parameters in array. Full list of regions can be found on region list page.
200: OK
Crowd entries successfully retrieved (short example). Response for request without any query parameters
[
{
"id": 4478,
"title": "Big Crowds expected on May 24 in Venice",
"description": null,
"date": "2019-05-24",
"avoid_crowds_score": 70,
"total_cruise_passengers": "5184",
"total_cruise_crew": "1805",
"ships_in_port": "MSC Lirica\t2371\nNorwegian Star\t2813",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": null
},
{
"id": 4479,
"title": "Very Big Crowds expected on May 25 in Venice",
"description": null,
"date": "2019-05-25",
"avoid_crowds_score": 100,
"total_cruise_passengers": "12920",
"total_cruise_crew": "4815",
"ships_in_port": "Costa Luminosa\t2712\nMSC Musica\t3060\nMSC Sinfonia\t2340\nOceania Riviera\t1447\nRhapsody Of The Seas\t2431\nViking Star\t930",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
},
{
"id": 4480,
"title": "Very Big Crowds expected on May 26 in Venice",
"description": null,
"date": "2019-05-26",
"avoid_crowds_score": 100,
"total_cruise_passengers": "12409",
"total_cruise_crew": "4011",
"ships_in_port": "AIDAblu\t2500\nCosta Deliziosa\t2712\nms Veendam\t1620\nMSC Magnifica\t3007\nMSC Opera\t2570",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
},
{
"id": 4481,
"title": "Big Crowds expected on May 27 in Venice",
"description": null,
"date": "2019-05-27",
"avoid_crowds_score": 70,
"total_cruise_passengers": "2874",
"total_cruise_crew": "1108",
"ships_in_port": "Marella Celebration\t1254\nms Veendam\t1620",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
}
]
401: Unauthorized
Incorrect API token
{
"message": "Unauthenticated."
}
403: Forbidden
User was restricted in admin panel
{
"message": "Restricted user"
}
404: Not Found
Incorrect address of API route
{
"message": ""
}
500: Internal Server Error
Could not find a crowds matching this query.
{
"message": "Server Error"
}

get
Get crowd entries by region

https://avoid-crowds.dev/api/crowds/{region}
Request
Response
Headers
Authentication
required
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}
Query Parameters
include
optional
string
Include related region for crowd entry. Single available value: region
sort
optional
string
The sort query parameter is used to determine by which property the results collection will be ordered. Sorting is ascending by default. Adding a hyphen (-) to the start of the property name will reverse the results collection. In case of sorting by multiple fields, write the fields in string format, separated by comma without space. Available fields for sorting: date avoid_crowds_score total_cruise_passengers total_cruise_crew local_public_holiday
fields[crowds]
optional
string
In case you want to fetch only a couple fields to reduce the overall size of your SQL query. This can be done using the fields query parameter. In case of getting multiple fields, write fields in string format, separated by comma without a space after the comma. Available fields for sorting: id title description date avoid_crowds_score total_cruise_passengers total_cruise_crew ships_in_port local_public_holiday local_school_vacation local_events vacations
filter
optional
array
The filter query parameters can be used to filter results by partial property value, exact property value or if a property value exists in a given array of values. There are a lot of flexible filters for crowds below.
optional
string
Get entries for dates in many differents ways. Format of date: Y-m-d (For example, 2019-05-25) + (equal to tomorrow) - (equal to yesterday) ago first next last this yesterday today Some date parameter examples: next wednesday last friday this thursday
filter[days_before]
optional
string
Get entries before passed day. Format of date is the same as for filter[date]
filter[days_after]
optional
string
Get entries after passed day. Format of date is the same as for filter[date]
filter[days_between]
optional
string
Get entries between two days. Format of dates is the same as for filter[date]. Two dates must be separated by comma without a space after the comma. Example: today,next Friday
200: OK
Crowd entries successfully retrieved (short example). Response for request without any query parameters
[
{
"id": 4478,
"title": "Big Crowds expected on May 24 in Venice",
"description": null,
"date": "2019-05-24",
"avoid_crowds_score": 70,
"total_cruise_passengers": "5184",
"total_cruise_crew": "1805",
"ships_in_port": "MSC Lirica\t2371\nNorwegian Star\t2813",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": null
},
{
"id": 4479,
"title": "Very Big Crowds expected on May 25 in Venice",
"description": null,
"date": "2019-05-25",
"avoid_crowds_score": 100,
"total_cruise_passengers": "12920",
"total_cruise_crew": "4815",
"ships_in_port": "Costa Luminosa\t2712\nMSC Musica\t3060\nMSC Sinfonia\t2340\nOceania Riviera\t1447\nRhapsody Of The Seas\t2431\nViking Star\t930",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
},
{
"id": 4480,
"title": "Very Big Crowds expected on May 26 in Venice",
"description": null,
"date": "2019-05-26",
"avoid_crowds_score": 100,
"total_cruise_passengers": "12409",
"total_cruise_crew": "4011",
"ships_in_port": "AIDAblu\t2500\nCosta Deliziosa\t2712\nms Veendam\t1620\nMSC Magnifica\t3007\nMSC Opera\t2570",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
},
{
"id": 4481,
"title": "Big Crowds expected on May 27 in Venice",
"description": null,
"date": "2019-05-27",
"avoid_crowds_score": 70,
"total_cruise_passengers": "2874",
"total_cruise_crew": "1108",
"ships_in_port": "Marella Celebration\t1254\nms Veendam\t1620",
"local_public_holiday": null,
"local_school_vacation": 0,
"local_events": null,
"vacations": "England, Wales, Luxembourg"
}
]
401: Unauthorized
Incorrect API token
{
"message": "Unauthenticated."
}
403: Forbidden
User was restricted in admin panel
{
"message": "Restricted user"
}
404: Not Found
Incorrect address of API route
{
"message": ""
}
500: Internal Server Error
Could not find a crowds matching this query.
{
"message": "Server Error"
}