eu_search: Europeana search.

View source: R/eu_search.R

eu_searchR Documentation

Europeana search.

Description

Europeana search.

Usage

eu_search(query, profile = NULL, qf = NULL, limit = 10, start = NULL,
  key = NULL, callopts = list())

Arguments

query

(character) Query string

profile

(character) Profile parameter controls the format and richness of the response. See Details.

qf

(character) Facet filtering query. This parameter can be defined more than once.

limit

(numeric) The number of records to return. Maximum is 100. Defaults to 10.

start

(numeric) The item in the search results to start with. The first item is 1. Defaults to 1.

key

(character) API key for Europeana

callopts

Curl options passed on to httr::GET

Details

Possible values of the profile parameter:

  • minimal - Returns minimal set of metadata

  • standard - TBD

  • facets - Information about facets is added. For the records the Standard profile is used.

  • breadcrumbs - information about the query is added in the form of breadcrumbs.

  • portal - Standard, Facets, and Breadcrumb combined

  • params - The header of the response will contain a params key, which lists the requested and default parameters of the API call.

Examples

## Not run: 
eu_search(query='Mona Lisa')
eu_search(query='who:"Leonardo da Vinci"')
eu_search(query='mona AND lisa')
out <- eu_search(query='Lasioglossum')
out$itemsCount
out$items[[6]]
library("httr")
GET(out$items[[6]]$link)
browseURL(out$items[[6]]$guid)

# Using the profile parameter
eu_search(query='Mona Lisa', profile='minimal', limit=1)
eu_search(query='Mona Lisa', profile='standard', limit=1)
eu_search(query='Mona Lisa', profile='facets', limit=1)
eu_search(query='Mona Lisa', profile='breadcrumbs', limit=1)
eu_search(query='Mona Lisa', profile='portal', limit=1)
eu_search(query='Mona Lisa', profile='params', limit=1)

# Range search
eu_search(query='[a TO b]', limit=3)

# Time range search
eu_search(query='YEAR:[1525 TO 1527]', limit=3)

# Date search
eu_search(query='timestamp_updated:"2013-03-16T20:26:27.168Z"')

# Geographical bounding box search
eu_search(query='pl_wgs84_pos_lat:[45 TO 47] AND pl_wgs84_pos_long:[7 TO 8]', limit=3)

# Using faceting via the qf parameter
out <- eu_search(query='Westminster', qf='where:London')
out$items[[1]]
## objects containing the term Paris among images
eu_search(query='Paris', qf='TYPE:IMAGE')
## objects containing the term Paris among images, with profile='facets'
eu_search(query='Paris', qf='TYPE:IMAGE', profile='facets')
## objects containing the term Paris among objects described in French
eu_search(query='Paris', qf='LANGUAGE:FR')
## objects dated by the year 1789
eu_search(query='Paris', qf='YEAR:1789')
## objects provided by an institution based in France
eu_search(query='Paris', qf='COUNTRY:france')
## objects protected by the Rights Reserved - Free Access licence
eu_search(query='Paris', qf='RIGHTS:http://www.europeana.eu/rights/rr-f/')
## objects provided by the user community:
eu_search(query='Paris', qf='UGC:true')

## End(Not run)

ropensci/rmetadata documentation built on May 18, 2022, 6:41 p.m.