Welcome to MOT Sanakirjat® API!
About Kielikone
Kielikone Oy is the Finnish market leader in language technology. Our main product, MOT Kielipalvelu®, is used every day by thousands of people in companies, educational
organizations, and public services. What our users have in common is the need for reliable, up-to-date and
user-friendly language tools.
We offer our partners access to our high-quality content, MOT Sanakirjat®, also
directly via an application programming interface (API).
We will be happy to help you build your own integration with our world-class data!
What is possible using our API
Integrated dictionaries
Use our dictionary exactly where your users are, on your platform. With our API it is possible to bring our
high-quality dictionary content right to your users.
Cleverer bots
Structured data, base forming and dependency parsing technology help solve many language problems especially relevant in Finnish
language.
Games
Large collection of example sentences and definition lookup can be used to enhance various word games.
Pricing
To get your copy of MOT Sanakirjat® API key, please email us at: myynti@kielikone.fi. Tell us briefly about you and
your project and we’ll get back to you.
Getting started with the API
MOT Sanakirjat® API is a RESTful HTTP API that offers dictionary and other
linguistic data. To get your copy of MOT Sanakirjat® API key, please email us at:
myynti@kielikone.fi.
What data is available?
The API offers different types of data via different endpoints. Below is a brief
description of each endpoint.
analysis
Tokenize, morphologically analyze and dependency parse Finnish text.
These endpoints will help you perform complex analysis tasks like information retrieval and other rule-based natural language processing.
autocomplete
Find out whether a word exists in the dictionary and has translations. Also returns matches beginning with
the searched term. Examples:
-
Search for cat from English into Finnish: returns cat, catacomb, cataclysm,
etc.
In most languages, you can search with or without accents and with or without spaces, hyphens, periods etc.:
-
Search for dej from English into Finnish: returns deject, dejecta, de jure,
déjà vu, etc.
search
Get full dictionary entries that match the searched word (case-insensitive). Depending on the language and
original data source, dictionary entries include information about the headword (part-of-speech, grammatical
information, etc.) as well as translations, usage example sentences and translations for the usage examples.
Examples:
-
Search for cat from English into Finnish: returns all the full entries for cat, CAT
and C.A.T with information about the headwords as well as translations into Finnish.
inflections
Get inflections or conjugated forms for a given word. For example:
-
For the Finnish noun talo, get the forms taloa, talon, taloon, etc.
lemmatize
See what the possible base forms (lemmas) of a word form are. For example:
-
For the Finnish word form alusta, get the possible base forms alus, alku,
alustaa, alunen.
dictionaries
Get the available dictionary groups and the languages they contain.
Dictionaries are grouped under mot.general, mot.law, mot.medicine and mot.tech_commerce.
By default, search results come from all dictionaries that match the requested languages.
By using the dictionaries parameter, you can select any subset of dictionary groups.
Code samples
Below are minimal examples of calling the API in different programming languages to help get you started.
Calling the API: Python sample code
import requests
api_key = 'acbedfg-abcd-abcd-abcd-abcd' # Replace with your own API key
url = 'https://apiv2.sanakirja.fi/api/v1/search'
my_headers = {'key': api_key}
my_parameters = {
'keyword': 'cat',
'keyword_language': 'en',
'target_language': 'fi'
}
response = requests.get(url, headers=my_headers, params=my_parameters)
data = response.json()
print(data)
headword = data[0]['headword']
Calling the API: JavaScript (Node.js) sample code
const axios = require('axios');
const apiKey = 'acbedfg-abcd-abcd-abcd-abcd'; // Replace with your own API key
axios.get('https://apiv2.sanakirja.fi/api/v1/search', {
params: {
keyword: 'cat',
keyword_language: 'en',
target_language: 'fi'
},
headers: {
key: apiKey
}
})
.then(function(response) {
let parsed = JSON.stringify(response.data, null, 2);
console.log(parsed);
});
Calling the API: using monolingual dictionary
axios.get('https://apiv2.sanakirja.fi/api/v1/search', {
params: {
keyword: 'yrittää',
keyword_language: 'fi',
target_language: 'fi',
dictionaries: 'mot.general'
},
headers: {
key: apiKey
}
})...;
axios.get('https://apiv2.sanakirja.fi/api/v1/search', {
params: {
keyword: 'yrittää',
keyword_language: 'fi',
target_language: 'en,fi', // both English and monolingual Finnish results
dictionaries: 'mot.general,mot.tech_commerce'
},
headers: {
key: apiKey
}
})...;
Calling the API: using multilingual dictionary
axios.get('https://apiv2.sanakirja.fi/api/v1/search', {
params: {
keyword: 'helsinki',
keyword_language: 'fi',
target_language: 'fi,sv,en,se' // results in multiple languages
},
headers: {
key: apiKey
}
})...;