Internet Archive Scraping API Access

ia_scrape(query, fields = c("identifier", "addeddate", "title"),
  sorts = "identifier asc", count = 5000L, summary = FALSE)

Arguments

query

the query; Lucene-like query; See IA Advanced Search for possible options.

fields

Use ia_fields() for an up-to-date listing of possible reutrn fields. Default is c("identifier", "addeddate", "title").

sorts

sort collations, character vector. Any of the sort fields from the fields`` endpoint can be specified. If theidentifier`` is specified as a sort field, it must be the last sort (the function will try to help you out with this if you forget). A field can have an asc or `desc` modifier (separate it from the field name with a space). The default is `identifier asc` (and is always the implied last collation). Example: `c("title asc", "publicdata desc")`

count

The number of results to return. Minimum is 100. Default is 5000, Maximum is 9999; See https://archive.org/help/aboutsearch.htm for information on restrictions. Use ia_scrape_next_page() on the return value of this function (or the result of ia_scrape_next_page()) to paginate through API results until ia_scrape_next_page()) returns NULL or ia_scrape_has_more() returns FALSE.

summary

if TRUE, then only the number of results is returned. Default: FALSE

References

https://archive.org/help/aboutsearch.htm

See also

Examples

x <- ia_scrape("lemon curry")