| Title: | Access the 'Finto' API |
| Version: | 0.1.2 |
| Date: | 2026-09-16 |
| Maintainer: | Akewak Jeba <akewak84@gmail.com> |
| Description: | Access and retrieve vocabulary data 'Finto' API https://api.finto.fi/, which is a centralized service for interoperable thesauri, ontology and classification schemes for different subject areas. |
| License: | BSD_2_clause + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | tibble, httr, dplyr, jsonlite, ISOcodes, tidyr, stringr, rlang, purrr |
| Suggests: | testthat (≥ 3.0.0), rmarkdown, knitr |
| URL: | https://fennicahub.github.io/finto/ |
| BugReports: | https://github.com/fennicahub/finto/issues |
| Config/testthat/edition: | 3 |
| VignetteBuilder: | knitr |
| Depends: | R (≥ 3.5) |
| Config/roxygen2/version: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-09-16 12:44:42 UTC; akasia |
| Author: | Akewak Jeba |
| Repository: | CRAN |
| Date/Publication: | 2026-09-18 22:50:08 UTC |
Sample Subset of Fennica Bibliographic Records
Description
A 300-record sample from the Fennica dataset (Melinda) for demonstration and testing.
Format
A data frame with 300 rows and 28 variables:
- melinda_id
Melinda record ID (001)
- leader
MARC leader field
- 008
Fixed-length data elements (008)
- author_name
Personal name of the main author (100a)
- author_date
Birth/death dates or period of activity (100d)
- author_ID
Combined authority ID from fields 100$0 and 264a
- language
Language code(s) (041a)
- language_original
Original language (041h)
- title_uniform
Uniform title (240a)
- title
Main title (245a)
- title_remainder
Remainder of title (245b)
- publication_place
Place of publication (260a)
- publisher
Name of publisher (260b)
- physical_dimensions
Dimensions (300c)
- physical_extent
Extent (300a)
- publication_frequency
Publication frequency (310a)
- publication_interval
Dates of publication (362a)
- signum
Call number or shelf mark
- location_852
Library location (852a)
- UDK
Universal Decimal Classification (080a)
- UDK_aux
Auxiliary UDC notation (080x)
- 245n
Part/section of a work (245n)
- genre_655
Genre/form terms (655a)
- 650a
Topical subject headings (650a)
- general_note
General note (500a)
- 700a
Added entry – personal name (700a)
- 700_0
Authority ID for added personal name (700$0)
- a.15
Unidentified field (parsing artifact)
Source
https://www.kansalliskirjasto.fi/fi/palvelut/fennica-suomen-kansallisbibliografia
Fetch RDF data for a specific concept from the Finto Skosmos API using a single asteriID
Description
This function retrieves RDF data for a given concept from the Finto API. The user only needs to provide the asteriID, which is appended to a fixed base URI.
Usage
fetch_kanto_info(asteriID, format = "application/json")
Arguments
asteriID |
The unique identifier to append to the base URI. |
format |
The MIME type of the serialization format (e.g., "application/rdf+xml" or "text/turtle"). Default is "application/json". |
Value
A tibble containing the RDF data for the concept.
Examples
## Not run:
concept_data <- fetch_kanto_info(asteriID = "000094320")
print(concept_data)
## End(Not run)
Fetch hierarchy of professions from Finto API
Description
This function retrieves broader/narrower relationships and constructs a hierarchical structure.
Usage
fetch_profession_hierarchy(concept_uri, vocid = "mts", depth = 3)
Arguments
concept_uri |
The URI of the starting profession (root). |
vocid |
The vocabulary ID (default: "mts"). |
depth |
The depth of hierarchy to fetch (default: 3). |
Value
A data.frame representing the hierarchy.
Examples
## Not run:
hierarchy_df <- fetch_profession_hierarchy("http://urn.fi/URN:NBN:fi:au:mts:m3357")
print(hierarchy_df)
## End(Not run)
Fetch all metadata from Finto Skosmos API
Description
This function queries the Finto API for a given concept URI and extracts all relevant metadata fields.
Usage
fetch_profession_info(concept_uri)
Arguments
concept_uri |
The URI of the concept to fetch. |
Value
A tibble containing the full metadata.
Examples
## Not run:
metadata <- fetch_profession_info("http://urn.fi/URN:NBN:fi:au:mts:m3357")
print(metadata)
## End(Not run)
Helper function to send requests to the Finto Skosmos API
Description
Helper function to send requests to the Finto Skosmos API
Usage
finto_api_request(endpoint, params = list())
Arguments
endpoint |
API endpoint to request. |
params |
List of query parameters. |
Value
Parsed JSON response from the API.
Examples
## Not run:
finto_api_request("vocabularies")
## End(Not run)
Get the initial letters of the alphabetical index for labels in a specific vocabulary from the Finto Skosmos API
Description
Get the initial letters of the alphabetical index for labels in a specific vocabulary from the Finto Skosmos API
Usage
get_alphabetical_index_letters(vocid, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
Value
A tibble containing the initial letters of the alphabetical index.
Examples
## Not run:
result <- get_alphabetical_index_letters(vocid = "yso", lang = "fi")
print(result)
## End(Not run)
Get broader concepts for a specific concept from the Finto Skosmos API
Description
Get broader concepts for a specific concept from the Finto Skosmos API
Usage
get_broader_concepts(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose broader concepts to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the broader concepts (prefLabel and uri) for the specified concept.
Examples
## Not run:
conepts <- get_broader_concepts(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p22922", lang = "fi")
print(conepts)
## End(Not run)
Get broader transitive concepts for a specific concept from the Finto Skosmos API
Description
Get broader transitive concepts for a specific concept from the Finto Skosmos API
Usage
get_broader_transitive_concepts(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose broader transitive concepts to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the broader transitive concepts (prefLabel and uri) for the specified concept.
Examples
## Not run:
concepts <- get_broader_transitive_concepts(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p22922", lang = "fi")
print(concepts)
## End(Not run)
Get children concepts for a specific concept from the Finto Skosmos API
Description
Get children concepts for a specific concept from the Finto Skosmos API
Usage
get_children_concepts(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose children concepts to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the children concepts (prefLabel, uri, hasChildren) for the specified concept.
Examples
## Not run:
children <- get_children_concepts(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p690", lang = "fi")
print(children)
## End(Not run)
Get RDF data for a specific concept from the Finto Skosmos API
Description
Get RDF data for a specific concept from the Finto Skosmos API
Usage
get_concept_data(uri, format = "application/json")
Arguments
uri |
The URI of the concept to retrieve data for. |
format |
The MIME type of the serialization format (e.g., "application/rdf+xml" or "text/turtle"). Default is "application/json". |
Value
A tibble containing the RDF data for the concept.
Examples
## Not run:
concept_data <- get_concept_data(uri = "http://www.yso.fi/onto/afo/")
print(concept_data)
## End(Not run)
Get concept groups for a given vocabulary from the Finto Skosmos API
Description
Get concept groups for a given vocabulary from the Finto Skosmos API
Usage
get_concept_groups(vocid, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
Value
A tibble containing concept groups, with fields for URI, prefLabel, and hasMembers.
Examples
## Not run:
result <- get_concept_groups(vocid = "yso", lang = "fi")
print(result)
## End(Not run)
Get labels for a specific concept from the Finto Skosmos API and return as a tibble
Description
Get labels for a specific concept from the Finto Skosmos API and return as a tibble
Usage
get_concept_labels(uri, lang = NULL)
Arguments
uri |
The URI of the concept to retrieve labels for. |
lang |
The language of labels to retrieve, e.g., "en" or "fi". Optional. |
Value
A tibble containing the URI, preferred label (prefLabel), alternative labels (altLabel), and hidden labels (hiddenLabel) for the concept.
Examples
## Not run:
labeles <- get_concept_labels(uri = "http://www.yso.fi/onto/koko/p91024",
lang = "fi")
print(labeles)
## End(Not run)
Get labels for a specific concept from the Finto Skosmos API
Description
Get labels for a specific concept from the Finto Skosmos API
Usage
get_concept_labels_vocid(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose labels to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the labels (prefLabel, altLabel, hiddenLabel) for the specified concept.
Examples
## Not run:
lables <- get_concept_labels_vocid(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p22922", lang = "fi")
print(lables)
## End(Not run)
Get concepts starting with a specific letter in the alphabetical index for a given vocabulary
Description
Get concepts starting with a specific letter in the alphabetical index for a given vocabulary
Usage
get_concepts_by_letter(vocid, letter, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
letter |
The initial letter, or "0-9" for numeric or "!*" for special character labels. |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
Value
A tibble containing concepts with labels starting with the given letter.
Examples
## Not run:
result <- get_concepts_by_letter(vocid = "yso", letter = "A", lang = "fi")
print(result)
## End(Not run)
Get members of a specific concept group from the Finto Skosmos API
Description
Get members of a specific concept group from the Finto Skosmos API
Usage
get_group_members(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept group whose members to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing members associated with the specified concept group.
Examples
## Not run:
group_members_data <- get_group_members(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p26580", lang = "fi")
print(head(group_members_data))
## End(Not run)
Get the hierarchical context for a specific concept from the Finto Skosmos API
Description
Get the hierarchical context for a specific concept from the Finto Skosmos API
Usage
get_hierarchy(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose hierarchical context to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the hierarchical context (broader, narrower, prefLabel, etc.) for the specified concept.
Examples
## Not run:
hierarchy <- get_hierarchy(vocid = "yso", uri = "http://www.yso.fi/onto/yso/p24489", lang = "fi")
print(hierarchy)
## End(Not run)
Process and Fetch KANTO Information using a list of author_IDs as column
Description
This function extracts Asteri IDs from the 'author_ID' column as list, fetches RDF data from the Finto Skosmos API using those IDs, and returns a cleaned tibble with the retrieved metadata, profession labels, place labels, and related-person, title, language, and field-of-activity labels.
Usage
get_kanto(data)
Arguments
data |
A dataframe containing an 'author_ID' column with values like "(FIN11)000069536". |
Value
A tibble with author_ID, RDF data, and resolved human-readable labels.
Examples
## Not run:
author_info <- get_kanto(fennica_subset)
## End(Not run)
Get label statistics by language in a specific vocabulary from the Finto Skosmos API
Description
Get label statistics by language in a specific vocabulary from the Finto Skosmos API
Usage
get_label_statistics(vocid)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
Value
A tibble containing the label statistics for each language, with columns for language, literal, property, and label count.
Examples
## Not run:
result <- get_label_statistics(vocid = "yso")
print(result)
## End(Not run)
Get mappings for a specific concept from the Finto Skosmos API
Description
Get mappings for a specific concept from the Finto Skosmos API
Usage
get_mappings(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose mappings to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing mappings associated with the specified concept.
Examples
## Not run:
mappings_data <- get_mappings(vocid = "yso", uri = "http://www.yso.fi/onto/yso/p22922", lang = "fi")
print(mappings_data)
## End(Not run)
Get modified concepts in a specific vocabulary from the Finto Skosmos API
Description
Get modified concepts in a specific vocabulary from the Finto Skosmos API
Usage
get_modified_concepts(vocid, lang = NULL, offset = NULL, limit = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
offset |
Offset for the starting index of the results. Optional. |
limit |
Maximum number of concepts to return. Optional. |
Value
A tibble containing the modified concepts with URI, label, and modification date.
Examples
## Not run:
result <- get_modified_concepts(vocid = "yso", lang = "fi", limit = 10)
print(result)
## End(Not run)
Get narrower concepts for a specific concept from the Finto Skosmos API
Description
Get narrower concepts for a specific concept from the Finto Skosmos API
Usage
get_narrower_concepts(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose narrower concepts to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the narrower concepts (prefLabel and uri) for the specified concept.
Examples
## Not run:
narrower_concepts <- get_narrower_concepts(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p690", lang = "fi")
print(narrower_concepts)
## End(Not run)
Get narrower transitive concepts for a specific concept from the Finto Skosmos API
Description
Get narrower transitive concepts for a specific concept from the Finto Skosmos API
Usage
get_narrower_transitive(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose narrower transitive hierarchy to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the narrower transitive concepts (prefLabel and uri) for the specified concept.
Examples
## Not run:
narrow <- get_narrower_transitive(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p690", lang = "fi")
print(narrow)
## End(Not run)
Get new concepts in a specific vocabulary from the Finto Skosmos API
Description
Get new concepts in a specific vocabulary from the Finto Skosmos API
Usage
get_new_concepts(vocid, lang = NULL, offset = NULL, limit = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
offset |
Offset for the starting index of the results. Optional. |
limit |
Maximum number of concepts to return. Optional. |
Value
A tibble containing the new concepts with URI, label, and creation date.
Examples
## Not run:
result <- get_new_concepts(vocid = "yso", lang = "fi", limit = 10)
print(result)
## End(Not run)
Get related concepts for a specific concept from the Finto Skosmos API
Description
Get related concepts for a specific concept from the Finto Skosmos API
Usage
get_related_concepts(vocid, uri, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
uri |
The URI of the concept whose related concepts to retrieve. |
lang |
The language code for the labels, e.g., "fi" or "en". Optional. |
Value
A tibble containing the related concepts (prefLabel and uri) for the specified concept.
Examples
## Not run:
related <- get_related_concepts(vocid = "yso",
uri = "http://www.yso.fi/onto/yso/p24489", lang = "fi")
print(related)
## End(Not run)
Get top concepts of a specific vocabulary from the Finto Skosmos API
Description
Get top concepts of a specific vocabulary from the Finto Skosmos API
Usage
get_top_concepts(vocid, lang = NULL, scheme = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels to retrieve, e.g., "en" or "fi". Optional. |
scheme |
The concept scheme to retrieve top concepts from. Optional. |
Value
A tibble containing the URI, label, topConceptOf, notation, and hasChildren for each top concept.
Examples
## Not run:
result <- get_top_concepts(vocid = "yso", lang = "fi")
print(result)
## End(Not run)
Get information about the types (classes) of objects in all vocabularies from the Finto Skosmos API
Description
Get information about the types (classes) of objects in all vocabularies from the Finto Skosmos API
Usage
get_types(lang = NULL)
Arguments
lang |
The language of labels to retrieve, e.g., "en" or "fi". Optional. |
Value
A tibble containing the URI, label, and superclass for each type.
Examples
## Not run:
result <- get_types(lang = "fi")
print(result)
## End(Not run)
Get available vocabularies from the Finto Skosmos API
Description
Get available vocabularies from the Finto Skosmos API
Usage
get_vocabularies(lang = "fi")
Arguments
lang |
Language of labels, e.g., "en" or "fi" (default is "fi") |
Value
A data frame with the vocabulary details: uri, id, and title
Examples
## Not run:
result <- get_vocabularies(lang = "fi")
print(result)
## End(Not run)
Get and structure RDF data of the whole vocabulary or a specific concept from the Finto Skosmos API
Description
Get and structure RDF data of the whole vocabulary or a specific concept from the Finto Skosmos API
Usage
get_vocabulary_data(
vocid,
format = "application/rdf+xml",
uri = NULL,
lang = NULL
)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
format |
The MIME type of the serialization format, e.g., "application/rdf+xml". Default is "application/rdf+xml". |
uri |
The URI of a specific concept to retrieve data for. If NULL, retrieves data for the entire vocabulary. Optional. |
lang |
The RDF language code for the requested resource, e.g., "fi" or "en". Optional. |
Value
A character string containing the raw RDF response.
Examples
rdf_xml_data <- get_vocabulary_data(
vocid = "yso",
uri = "http://www.w3.org/2004/02/skos/core#Concept",
format = "application/rdf+xml"
)
cat(rdf_xml_data)
turtle_data <- get_vocabulary_data(
vocid = "yso",
format = "text/turtle"
)
cat(turtle_data) # Print the Turtle data
Get general information about a specific vocabulary from the Finto Skosmos API
Description
Get general information about a specific vocabulary from the Finto Skosmos API
Usage
get_vocabulary_info(vocid, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels to retrieve, e.g., "en" or "fi". Optional. |
Value
A list containing the vocabulary details such as URI, title, languages, and concept schemes.
Examples
## Not run:
result <- get_vocabulary_info(vocid = "yso", lang = "fi")
print(result)
## End(Not run)
Get vocabulary statistics as a single tibble containing concepts, subtypes, and concept groups
Description
Get vocabulary statistics as a single tibble containing concepts, subtypes, and concept groups
Usage
get_vocabulary_statistics(vocid, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
lang |
The language of labels, e.g., "en" or "fi". Optional. |
Value
A tibble containing counts of concepts, subtypes, and concept groups, with each entry in one row.
Examples
## Not run:
result <- get_vocabulary_statistics(vocid = "yso", lang = "fi")
print(result)
## End(Not run)
Get type information for a Finto vocabulary
Description
This function retrieves information about the types (classes) of objects
in a given Finto/Skosmos vocabulary, using the /types endpoint.
Usage
get_vocabulary_types(vocid, lang = NULL)
Arguments
vocid |
A Skosmos vocabulary identifier, e.g. |
lang |
Optional language code for labels, e.g. |
Value
A tibble with one row per type, typically containing columns
uri, label, and (optionally) superclass.
Examples
## Not run:
types <- get_vocabulary_types("yso", lang = "fi")
print(types)
## End(Not run)
Look up concepts by label in a specific vocabulary from the Finto Skosmos API
Description
Look up concepts by label in a specific vocabulary from the Finto Skosmos API
Usage
lookup_concept_by_label(vocid, label, lang = NULL)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
label |
The label to look up, e.g., "cat". |
lang |
The search language, e.g., "en" or "fi". Optional. |
Value
A tibble containing the best matching concept(s) with fields like uri, type, prefLabel, and altLabel.
Examples
## Not run:
result <- lookup_concept_by_label(vocid = "yso", label = "cat", lang = "en")
print(result)
## End(Not run)
Search for concepts in the Finto Skosmos API by query term with additional parameters
Description
Search for concepts in the Finto Skosmos API by query term with additional parameters
Usage
search_concepts(
query,
lang = NULL,
labellang = NULL,
vocab = NULL,
type = NULL,
parent = NULL,
group = NULL,
maxhits = NULL,
offset = NULL,
fields = NULL,
unique = NULL
)
Arguments
query |
The term to search for, e.g., "sibelius". |
lang |
Language of labels to match, e.g., "en" or "fi". Optional. |
labellang |
Language of labels to return, e.g., "en" or "fi". Optional. |
vocab |
Vocabulary or vocabularies to limit search to, e.g., "yso". Optional. |
type |
Limit search to concepts of the given type(s), e.g., "skos:Concept". Optional. |
parent |
Limit search to concepts which have the given concept as a parent. Optional. |
group |
Limit search to concepts in a specific group. Optional. |
maxhits |
Maximum number of results to return (default is 191 as per the screenshot). Optional. |
offset |
Offset to start in the result set, useful for paging. Optional. |
fields |
Extra fields to include in the results (space-separated list). Optional. |
unique |
Boolean flag to return each concept only once. Optional. |
Value
A data frame containing search results with columns: uri, type, prefLabel, altLabel, hiddenLabel, lang, and vocab.
Examples
## Not run:
concepts <- search_concepts(query = "sibelius", lang = "fi")
print(concepts)
## End(Not run)
Search for concepts and collections in a specific vocabulary from the Finto Skosmos API
Description
Search for concepts and collections in a specific vocabulary from the Finto Skosmos API
Usage
search_vocabulary_concepts(
vocid,
query,
lang = NULL,
type = NULL,
maxhits = NULL,
offset = NULL
)
Arguments
vocid |
The vocabulary ID, e.g., "yso". |
query |
The search term, e.g., "cat*". |
lang |
The language of labels to match, e.g., "en" or "fi". Optional. |
type |
Limit search to concepts of a given type, e.g., "skos:Concept". Optional. |
maxhits |
Maximum number of results to return. Optional. |
offset |
Offset where to start in the result set, useful for paging. Optional. |
Value
A tibble containing the search results with fields such as uri, type, prefLabel, and altLabel.
Examples
## Not run:
search_results <- search_vocabulary_concepts(vocid = "yso", query = "cat", lang = "en")
print(search_results)
## End(Not run)
Fetch place information from YSO places (yso-paikat)
Description
Fetch place information from YSO places (yso-paikat)
Usage
yso_place(x)
Arguments
x |
Place id, page URL, or YSO URI |
Value
A one-row tibble with key fields for the place
Examples
## Not run:
place <- yso_place("http://www.yso.fi/onto/yso/p94257")
print(place)
## End(Not run)