REST API
Last updated
Last updated
GET
https://avoid-crowds.dev/api/crowds
This endpoint allows you to get crowd entries.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
GET
https://avoid-crowds.dev/api/crowds/{region}
GET
https://avoid-crowds.dev/api/public_holidays
GET
https://avoid-crowds.dev/api/school_vacations
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
include
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
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]
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
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]
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]
string
Get entries before current day. Format of date is the same as for filter[date]
filter[days_after]
string
Get entries after current day. Format of date is the same as for filter[date]
filter[days_between]
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]
string
Filterting entries by parameters in array. Full list of regions can be found on region list page.
Authentication
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}
include
string
Include related region for crowd entry. Single available value: region
sort
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]
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
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]
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]
string
Get entries before passed day. Format of date is the same as for filter[date]
filter[days_after]
string
Get entries after passed day. Format of date is the same as for filter[date]
filter[days_between]
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
Authentication
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}
filter[source]
string
Get entries filtered by source
filter[provinces]
string
Get entries filtered by provinces
filter[scope]
string
Get entries filtered by scope
filter[name]
string
Get entries filtered by name
filter[country]
string
Get entries filtered by country
sort
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:
name
country
scope
provinces
filter
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]
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]
string
Get entries before passed day. Format of date is the same as for filter[date]
filter[days_after]
string
Get entries after passed day. Format of date is the same as for filter[date]
filter[days_between]
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
Authentication
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}
filter[source_official]
string
Get entries filtered by source official
filter[provinces]
string
Get entries filtered by provinces
filter[scope]
string
Get entries filtered by scope
filter[description]
string
Get entries filtered by name
filter[country]
string
Get entries filtered by country
sort
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:
description
country
scope
provinces
filter
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]
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]
string
Get entries before passed day. Format of date is the same as for filter[date]
filter[days_after]
string
Get entries after passed day. Format of date is the same as for filter[date]
filter[days_between]
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
Authentication
string
Bearer token is API key for full access to Avoid Crowds API. Example string for Authentication header: Bearer {your-token}