search_finna | R Documentation |
This function retrieves records from the Finna index with an option to limit the total number of records returned. The function paginates through the results, fetching records until the specified total limit is reached.
search_finna(
query = NULL,
type = "AllFields",
fields = NULL,
filters = NULL,
facets = NULL,
facetFilters = NULL,
sort = "relevance,id asc",
limit = 100,
lng = "fi",
prettyPrint = FALSE
)
query |
description |
type |
A string specifying the type of search. Options include "AllFields", "Title", "Author", "Subject". Defaults to "AllFields". |
fields |
A vector of fields to be returned in the search results. Defaults to NULL, which returns a standard set of fields. |
filters |
A vector of filter queries to refine the search. Defaults to NULL. |
facets |
A vector specifying which facets to return in the results. Defaults to NULL. |
facetFilters |
A vector of regular expressions to filter facets. Defaults to NULL. |
sort |
A string defining the sort order of the results. Options include:
|
limit |
An integer specifying the total number of records to return across multiple pages. |
lng |
A string for the language of returned translated strings. Options are "fi" - Finnish, "en-gb" - English, "sv" - Swedish, "se" - Sami. Defaults to "fi" - Finnish. |
prettyPrint |
A logical value indicating whether to pretty-print the JSON response. Useful for debugging. Defaults to FALSE. |
A tibble containing the search results with relevant fields extracted and provenance information.
search_results <- search_finna("sibelius", sort = "main_date_str desc", limit = 100)
print(search_results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.