query_record_api {europeanaR} | R Documentation |
Query Record API
Description
The Record API provides direct access to the Europeana data, which is modeled using the Europeana Data Model (EDM). While EDM is an open flexible data model featuring various kind of resources and relations between them, the Record API (and the Europeana Collections Portal) supports the retrieval of a segment of EDM for practical purposes.
These "atomic" EDM segments typically contain one Cultural Heritage Object (CHO), aggregation information that connects the metadata and digital representations, and a number of contextual resources related to the CHO, such as agents, locations, concepts, and time.
Usage
query_record_api(id, path = "/record/v2", ...)
Arguments
id |
string with the 'RECORD_ID' in the form of '/DATASET_ID/LOCAL_ID' |
path |
string that indicates version of the API |
... |
other parameters passed as query parameters |
Value
S3 object of class 'europeana_record_api'. Contains the parsed content, the path, and the API response compatible with 'httr' methods.
Source
https://pro.europeana.eu/page/record
References
Doerr M, Gradmann S, Hennicke S, Isaac A, Meghini C, Van de Sompel H (2010). “The europeana data model (edm).” In World Library and Information Congress: 76th IFLA general conference and assembly, volume 10, 15.
Wickham H (2020). httr: Tools for Working with URLs and HTTP. https://httr.r-lib.org/, https://github.com/r-lib/httr.
Ooms J (2014). “The jsonlite Package: A Practical and Consistent Mapping Between JSON Data and R Objects.” arXiv:1403.2805 [stat.CO]. https://arxiv.org/abs/1403.2805.
Examples
#set your API key with set_key(api_key = "XXXX")
#query search API
res <- query_search_api("arioch", qf = "1712", media = TRUE)
#get results in tidy format
dat <- tidy_search_items(res)
#query records API for each item
lapply(dat$id, query_record_api)