API

KulturNav API

This document briefly describes the KulturNav web service API.

HTTP methods

The API currently supports HTTP GET requests to read data.

Authentication

API calls are currently not authenticated or authorized. This means only published content and being readable for ANY user is returned.

API methods

Get single entity

http://kulturnav.org/api/<uuid>  

OR

http://kulturnav.org/<uuid>  
with HTTP header Accept: application/json  

OR

http://kulturnav.org/<uuid>.json  

Response: JSON object entity representation

List dataset or list content

http://kulturnav.org/api/list/<uuid>[/<offset>[/<max>]]  

Response: JSON array of entity representation. Without offset and max, the method returns the entire dataset or list content. With offset, the method returns the system default number of entities in the dataset or list content, starting from position offset. With offset and max, the method
returns max entities in the dataset or list content, starting from position offset.

Search dataset or content

http://kulturnav.org/api/search/<search-phrase>[/<offset>[/<max>]]  

Response: JSON array of entity representation. Without offset and max, the method returns the entire result. With offset, the method returns the system default number of entities in the dataset or list content, starting from position offset. With offset and max, the method returns max entities in the dataset or list content, starting from position offset.

Basic examples of search-phrases

Count the number of records describing a person licensed with CC-0:

/api/count/actualEntityType:Person,superconcept.license:c223fa3f-84eb-4c42-ac63-e544ebf4c609  

Search for persons licensed with CC-0 and return the 100 first records:

/api/search/actualEntityType:Person,superconcept.license:c223fa3f-84eb-4c42-ac63-e544ebf4c609/0/100  

Count records in dataset "Arkitekter verksamma i Sverige" created or updated after April 1st 2014:

/api/count/entity.dataset:2b7670e1-b44e-4064-817d-27834b03067c,savedAt:%3E20140401%20000000-S  

Search dataset "Arkitekter verksamma i Sverige" for records created or updated after April 1st 2014 and return the first 20 records:

/api/search/entity.dataset:2b7670e1-b44e-4064-817d-27834b03067c,savedAt:>20140401 000000-S/0/20  

and the next 20:

/api/search/entity.dataset:2b7670e1-b44e-4064-817d-27834b03067c,savedAt:>20140401 000000-S/20/20  

Search for records in dataset "Arkitekter verksamma i Sverige" with a Same as reference to a Wikidata entity and return the first 20 records:

/api/search/entity.dataset:2b7670e1-b44e-4064-817d-27834b03067c,entity.sameAs:https%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ*/0/20  

Search for a person named Wilse in the datasetet "Fotografregisteret (Norge)" and return a small easty structured JSON:

/api/summary/entityType:Person,entity.dataset:508197af-6e36-4e4f-927c-79f8f63654b2,person.lastName:Wilse  

Schema

Overview of schema.