xsearch: Retrieve records from LIBRIS Xsearch API

View source: R/xsearch.R

xsearchR Documentation

Retrieve records from LIBRIS Xsearch API

Description

The database used can be specified - the default is to use LIBRIS but "swepub" is also available

Usage

xsearch(
  query = NULL,
  start = 1,
  n = 10,
  order = c("rank", "alphabetical", "-alphabetical", "chronological", "-chronological"),
  format_level = c("brief", "full"),
  holdings = FALSE,
  database = c("libris", "swepub"),
  api_config = NULL
)

Arguments

query

text query as defined by the custom query language described here http://librishelp.libris.kb.se/help/search_language_swe.jsp

Operators are: ⁠AND, OR, NOT, ADJ, SAME, XOR⁠

A short list of examples follow below.

  • author is Ludwig Wittgenstein: forf:(Ludwig+Wittgenstein)

  • publications with title "Röda rummet": TIT:"Röda rummet"

  • publications with a set of titles (experiment or experiments or experimental): ⁠TIT=experiment OR TIT:experiments OR TIT:experimental⁠

  • publications by Horatius Quintus: ⁠PERS:(Horatius Quintus)⁠

start

integer that specifies the starting position in a hitlist from which records should be taken

n

the number of records to be retrieved, to a maximum of 200

order

sort order, one of "rank", "alphabetical", "-alphabetical", "chronological", "-chronological" where an opening hyphen stands for sorting in reverse order

format_level

one of "brief" or "full", which specifies whether “see” or ”see also” links to authority forms (9XX fields) should be included.

holdings

boolean defaulting to FALSE, specifies whether holding information should be included. Works only with the marcxml and mods formats.

database

one of "libris" or "swepub"

api_config

a configuration setting for the search API including base URL etc, by default from config()

Value

results records returned from the search

Examples

## Not run: 
xsearch(query = "WAMK:\"film noir\"")
xsearch(query = "PERS:(vitruvius) SPR:swe")

xsearch(query = "stolpverk SPR:swe", database = "swepub")$content %>%
dplyr::slice(1) %>%
dplyr::glimpse()

## End(Not run)

KTH-Library/XsearchLIBRIS documentation built on Jan. 29, 2025, 5:14 p.m.