R: Search UK National Biodiversity Network

nbn_search {taxize} | R Documentation

## Search UK National Biodiversity Network

### Description

Search UK National Biodiversity Network

### Usage

    nbn_search(q, fq = NULL, order = NULL, sort = NULL, start = 0,
      rows = 25, facets = NULL, ...)

### Arguments

`q` | (character) The query terms(s)
`fq` | (character) Filters to be applied to the original query. These are additional params of the form fq=INDEXEDFIELD:VALUE e.g. fq=rank:kingdom. See <https://species-ws.nbnatlas.org/indexFields> for all the fields that are queryable.
`order` | (character) Supports "asc" or "desc"
`sort` | (character) The indexed field to sort by
`start` | (integer) Record offset, to enable paging
`rows` | (integer) Number of records to return
`facets` | (list) Comma separated list of the fields to create facets on e.g. facets=basis_of_record.
`...` | Further args passed on to `GET`.

### Value

a list with slots for metadata ('meta') with list of response attributes, and data ('data“) with a data.frame of results

### Author(s)

Scott Chamberlain, myrmecocystus@gmail.com

### References

<https://api.nbnatlas.org/>

### See Also

Other nbn: `get_nbnid`, `nbn_classification`, `nbn_synonyms`

### Examples

    ## Not run:
    x <- nbn_search(q = "Vulpes")
    x$meta$totalRecords
    x$meta$pageSize
    x$meta$urlParameters
    x$meta$queryTitle
    head(x$data)

    nbn_search(q = "blackbird", start = 4)

    # debug curl stuff
    library('httr')
    nbn_search(q = "blackbird", config = verbose())

    ## End(Not run)

[Package taxize version 0.9.0 Index]