Linked Events information API (v1)

Download OpenAPI specification:Download

Linked Events provides categorized data on events and places using JSON-LD format.

Events can be searched by date and location. Location can be exact address or larger area such as neighbourhood or borough

JSON-LD format is streamlined using include mechanism. API users can request that certain fields are included directly into the result, instead of being hyperlinks to objects.

Several fields are multilingual. These are implemented as object with each language variant as property. In this specification each multilingual field has (fi,sv,en) property triplet as example.

event

Search and edit events

Return a list of events

Filtering retrieved events

Query parameters can be used to filter the retrieved events by the following criteria.

Event time

Use start and end to restrict the date range of returned events. Any events that intersect with the given date range will be returned.

The parameters start and end can be given in the following formats:

  • ISO 8601 (including the time of day), i.e. YYYY-MM-DDTHH:MM:SSZ
  • yyyy-mm-dd

In addition, today (for start or end of today) and now (for the exact current timestamp) can be used in either parameter to get current events.

Example:

event/?start=today&end=2020-12-31

See the result

event/?start=now&end=today

See the result

Event location

Specific location

To restrict the retrieved events to a known location(s), use the query parameter location, separating values by commas if you wish to query for several locations.

Location ids are found at the place endpoint, which lists the locations.

Event last modification time

To find events that have changed since you last polled Linkedevents API (to e.g. update your event cache), it is best to use the query parameter last_modified_since. This allows you to only return data that has changed after your last update. You may also include events that have been deleted in the API in the results by using the show_deleted filter. This allows you to update your cache with all added, modified and deleted events without having to fetch *all* future events every time.

Example:

event/?last_modified_since=2020-04-07&show_deleted=True

See the result

Event price

Events may or may not contain the offers field that lists event pricing. To return only free or non-free events, use the query parameteris_free. However, note that from some data sources, no event pricing info is available, so this filter will only return those events which have pricing data available.

Example:

event/?is_free=true

See the result

Event language

To find events that have a set language or event data translated into that language, use the query parameter language. If you only wish to see events that have a set language, use the in_language parameter, and if you only want event data translated to a set language, use the translation parameter.

Supported languages are found at the language endpoint, which also lists which languages have translations available. Currently, translations are supported in fi, sv, en, ru, zh_hans, and ar.

Example:

event/?language=ru

See the result

Event publisher

To find out events that are published by a specific organization, use the query parameter publisher, separating values by commas if you wish to query for several publishers.

Also, it is possible to fetch events under a specific publisher organization hierarchy (say

Event hierarchy

Events in linkedevents may be either standalone events, or they may have super or sub events. There are two types of super events, indicated in the field super_event_type by recurring (repeating events, event series) and umbrella (festivals etc.).

recurring events last for a period and have sub_events that all have similar data, but different dates.

umbrella events last for a period and may have different sub_events, including recurring events (i.e. an umbrella festival may have a recurring theater play sub_event, which may have several nights as sub_events.)

Super event type

You may use the query parameter super_event_type, comma separated, to get only super events of specific types. You may use none if you want non-super events included.

Example:

event/?super_event_type=umbrella,none

See the result

Super event

You may use the query parameter super_event, comma separated, to get all subevents for specific superevents. You may use none if you want all events which have no superevent included.

Example:

event/?super_event=linkedevents:agg-103

See the result

Getting detailed data

In the default case, keywords, locations, and other fields that refer to separate resources are only displayed as simple references.

If you want to include the complete data from related resources in the current response, use the keyword include. Please note, however, that including all the resources inlined in *every* event will result in a huge number of duplicate data in the json, making the json very slow to generate and process and causing considerable API load and long response times when too many such requests are made. Therefore, if you are listing the maximum number of events (100) or updating your cache with all events, please consider caching the keyword and location data separately to prevent unnecessary API slowdown and continuous repeated work. Keyword and location data seldom change and are easily fetched from their own endpoints separately.

Example:

event/?include=location,keywords

See the result

Ordering

Default ordering is descending order by -last_modified_time. You may also order results by start_time, end_time, name and duration. Descending order is denoted by adding - in front of the parameter, default order is ascending. For example:

event/?sort=-end_time

See the result

query Parameters
page
integer

request particular page in paginated results

page_size
integer

request that server delivers page_size results in response. 100 is the maximum value for page_size.

include
string

Embed given reference-type fields, comma-separated if several, directly into the response, otherwise they are returned as URI references.

text
string

Search (case insensitive) through all multilingual text fields (name, description, short_description, info_url) of an event (every language). Multilingual fields contain the text that users are expected to care about, thus multilinguality is useful discriminator.

last_modified_since
string <dateTime>

Search for events that have been modified since or at this time.

show_deleted
boolean

Include deleted events in the query.

event_status
string

Search for events with the specified status in the event_status field.

is_free
boolean

Search for events that have a price that is free, or not free.

start
string <date-time>

Search for events beginning or ending after this time. Dates can be specified using ISO 8601 ("2016-01-12") and additionally "today" and "now".

end
string <date-time>

Search for events beginning or ending before this time. Dates can be specified using ISO 8601 ("2016-01-12") and additionally "today" and "now".

bbox
Array of strings = 4 items

Search for events that are within this bounding box. Decimal coordinates are given in order west, south, east, north. Period is used as decimal separator. Coordinate system is EPSG:4326.

data_source
string

Search for events that come from the specified source system

location
string

Search for events in given locations as specified by id. Multiple ids are separated by comma

division
string

You may filter places by specific OCD division id, or by division name. The latter query checks all divisions with the name, regardless of division type..

keyword
string

Search for events with given keywords as specified by id. Multiple ids are separated by comma

keyword_AND
string

Search for events with all given keywords as specified by id. Multiple ids are separated by comma

min_duration
integer

Search for events that are longer than given time in seconds

max_duration
integer

Search for events that are shorter than given time in seconds

language
string

Search for events that have data or are organized in this language.

translation
string

Search for events that have data in this language.

in_language
string

Search for events that are organized in this language.

publisher
string

Search for events published by the given organization as specified by id.

publisher_ancestor
string

Search for events published by any suborganization under the given organization as specified by id.

super_event_type
string

Search for events with the given superevent type, including none. Multiple types are separated by comma

super_event
string

Search for events with the given superevent as specified by id, including none. Multiple ids are separated by comma

sort
string

Sort the returned events in the given order. Possible sorting criteria are 'start_time', 'end_time', 'duration' and 'last_modified_time'. The default ordering is '-last_modified_time'.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Retrieve single event by id

path Parameters
id
required
string

Event identifier as defined in event schema

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "location": {
    },
  • "keywords": [
    ],
  • "in_language": [
    ],
  • "super_event": "string",
  • "super_event_type": "string",
  • "event_status": "string",
  • "publication_status": "string",
  • "external_links": [
    ],
  • "offers": [
    ],
  • "sub_events": [
    ],
  • "custom_data": "string",
  • "name": {
    },
  • "images": [
    ],
  • "created_time": "2019-08-24T14:15:22Z",
  • "last_modified_time": "2019-08-24T14:15:22Z",
  • "info_url": {
    },
  • "description": {
    },
  • "short_description": {
    },
  • "date_published": "2019-08-24T14:15:22Z",
  • "provider": {
    },
  • "location_extra_info": {
    },
  • "start_time": "2019-08-24T14:15:22Z",
  • "end_time": "2019-08-24T14:15:22Z",
  • "audience": [
    ],
  • "data_source": "string",
  • "created_by": "string",
  • "last_modified_by": "string",
  • "publisher": "string",
  • "deleted": true,
  • "replaced_by": { },
  • "extension_course": {
    }
}

filter

Browse keywords, places and publishers for filtering events

Returns a list of keywords used for describing events

Using the keyword endpoint

Here, categories for events are listed. Events in each category can be found at the event endpoint using the query parameter keyword

Keyword text

To find keywords that contain a specific string, use the query parameter text.

Example:

keyword/?text=lapset

See the result

query Parameters
page
integer

request particular page in paginated results

page_size
integer

request that server delivers page_size results in response. 100 is the maximum value for page_size.

include
string

Embed given reference-type fields, comma-separated if several, directly into the response, otherwise they are returned as URI references.

text
string

Search for keywords (note: NOT events) that contain the given string. This applies even when show_all_keywords is specified.

sort
string

Sort the returned keywords in the given order. Possible sorting criteria are 'n_events', 'id', 'name', 'data_source'. The default ordering is '-data_source', '-n_events'.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Return information for single keyword

path Parameters
id
required
string

Same as id in keyword schema

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": {
    },
  • "images": [
    ],
  • "origin_id": "string",
  • "publisher": "string",
  • "created_time": "2019-08-24T14:15:22Z",
  • "last_modified_time": "2019-08-24T14:15:22Z",
  • "aggregate": true,
  • "data_source": "string",
  • "created_by": "string",
  • "last_modified_by": "string",
  • "alt_labels": [
    ],
  • "deprecated": true,
  • "replaced_by": { }
}

Return as list of keyword_sets for grouping keywords

Unlike other endpoints, keyword_sets do not support filtering. It is expected that the full result set will remain small enough. Recommended keyword_sets are keskisuomi:event-topics for general categorization and keskisuomi-event:audience for target grouping.

query Parameters
page
integer

request particular page in paginated results

page_size
integer

request that server delivers page_size results in response. 100 is the maximum value for page_size.

include
string

Embed given reference-type fields, comma-separated if several, directly into the response, otherwise they are returned as URI references.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Return information about single keyword_set

path Parameters
id
required
string

Same as id in keyword_set schema

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "origin_id": "string",
  • "created_time": "2019-08-24T14:15:22Z",
  • "last_modified_time": "2019-08-24T14:15:22Z",
  • "data_source": "string",
  • "last_modified_by": "string",
  • "usage": "any",
  • "organization": "string",
  • "keywords": [
    ]
}

Returns list of places used for describing events

Using the place endpoint

Here, locations for events are listed. Events in each location can be found at the event endpoint using the query parameter location.

Place text

To find places that contain a specific string, use the query parameter text.

Example:

place?text=tuomiokirkko

See the result

No parent

To find places that have no parent, e.g. cities or municipalities, user query parameter no_parent

Example:

place?no_parent=true

See the result

Is address

To find places that are just addresses, user query parameter is_address

Example:

place?is_address=true

See the result

query Parameters
page
integer

request particular page in paginated results

page_size
integer

request that server delivers page_size results in response. 100 is the maximum value for page_size.

no_parent
boolean

Used to get places without parent, e.g. cities or municipalities.

is_address
boolean

To find places that are just addresses.

sort
string

Sort the returned places in the given order. Possible sorting criteria are 'name', 'street_address' and 'postal_code'. The default ordering is 'name'.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Return information for single place

path Parameters
id
required
string

Id as defined in place model

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "custom_data": [
    ],
  • "name": {
    },
  • "origin_id": "string",
  • "created_time": "2019-08-24T14:15:22Z",
  • "last_modified_time": "2019-08-24T14:15:22Z",
  • "info_url": {
    },
  • "description": {
    },
  • "position": {
    },
  • "email": "string",
  • "telephone": {
    },
  • "street_address": {
    },
  • "address_locality": {
    },
  • "address_region": "string",
  • "postal_code": "string",
  • "post_office_box_num": "string",
  • "address_country": "string",
  • "deleted": true,
  • "data_source": "string",
  • "publisher": "string",
  • "replaced_by": { }
}

search

Fulltext search through events and places

language

Get supported languages

Return a list of languages used for describing events

The returned list describes languages used for describing events in this Linked events instance

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "data": [
    ]
}

Return information for single language

Can be used to retrieve translations for a single language

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": {
    }
}