Finto

Finto APIs

Welcome to explore Finto APIs! API (application programming interface) is an interface that enables data communication and transfer between applications. Finto's APIs are open source REST-style APIs that can be used in e.g. integration of vocabularies into cataloguing environments, data analysis and automated subject indexing. The two APIs offered by Finto are the vocabulary API and the automated subject indexing API.

Vocabulary API (api.finto.fi)

Finto vocabulary API can be used to retrieve information on vocabulary concepts by queries using e.g. search words or URIs. It is a REST-style API. Swagger documentation is available at https://api.finto.fi/doc while machine-readable JSON documentation is available at https://api.finto.fi/rest/v1/swagger.json.

Query examples

GET https://api.finto.fi/rest/v1/search?vocab=yso&query=histor*&lang=en Retrieve all concepts in a vocabulary in which the English preferred label starts with the string histor. Give results in JSON-LD format.
(The example query retrieves all such concepts in General Finnish Ontology YSO.)
GET https://api.finto.fi/rest/v1/data?uri=http://urn.fi/URN:NBN:fi:au:finaf:000149842&format=application/ld%2Bjson With the given identifier, retrieve all data of the corresponding concept. Give results in JSON-LD format.
(The example query's identifier relates to Minna Canth, the Finnish writer urn.fi/URN:NBN:fi:au:finaf:000149842.)
GET https://api.finto.fi/rest/v1/yso/data?format=text/turtle Retrieve all data within General Finnish Ontology (YSO) in Turtle format.

Automatic subject indexing API (ai.finto.fi)

Finto AI API can be used to provide subject indexing suggestions for texts. It is based on the automated indexing tool Annif. Interactive OpenAPI documentation is available at https://ai.finto.fi/v1/ui/ while machine-readable JSON documentation is available at https://ai.finto.fi/v1/openapi.json. The service offers different projects, which define the vocabulary from where the suggestions are drawn from and the language of the input text. For example, "yso-en" project gives suggestions from General Finnish Ontology YSO and is intended for texts in English. Further information on Finto AI is available at Finto AI, a service for automated subject indexing.

Query examples

GET https://ai.finto.fi/v1/projects Retrieve all projects available. Give results in JSON format.
POST https://ai.finto.fi/v1/projects/yso-en/suggest
Request body: in "application/x-www-form-urlencoded" content-type a "text" field containing "National Library of Finland main building is located in Helsinki, next to the Helsinki Cathedral.".
Give subject indexing suggestions for a text using the project "yso-en". Text content size can be at maximimum 5 MB. Give results in JSON format.
POST https://ai.finto.fi/v1/projects/yso-en/suggest-batch
Requst body: in "application/json" content-type
{
  "documents": [
    {
      "text": "National Library of Finland main building is
      located in Helsinki, next to the Helsinki Cathedral."
    },
    {
      "text": "Finto AI is one of several open source services
      provided by the National Library of Finland."
    }
  ]
}
Give subject indexing suggestions for two texts. At maximum, the query can include and give suggestions to 32 texts. Give results in JSON format.

Usage policy

At the moment, there are no usage restrictions for the APIs. API keys are not used. To prevent overload, please avoid having multiple API requests simultaneously. Please wait for your previous request to finish before making a new one. If you have a need for a large amount of queries for the vocabulary API, please consider downloading the vocabularies in question to examine them locally.

Finto vocabularies have an open license, usually either CC0 or CC-BY depending on the vocabulary. Please find the license of the requested vocabulary on their front page at finto.fi. See, for example, General Finnish ontology front page and KANTO vocabulary front page .

Feedback and contact

We are delighted to hear any user feedback. Please feel free to share your user experiences or send questions and comments to our email address: [email protected]