Skip to contents

Searches the public Observation.org species catalogue (/api/v1/species/search/). Use this to check a name, recover an ID, or list taxa matching a fragment ("Falco") before filtering an export. It does not download observations; obs_read() stays offline.

Usage

obs_species(q, locale = "en", group = NULL, limit = 50, timeout = 20)

Arguments

q

Search string (scientific or common name, or a fragment).

locale

Label language for common names. "en" (default).

group

Optional species-group name ("Birds") or id. Applied to the returned page, not as a guarantee of a complete group list.

limit

Maximum hits to keep (API page size). Default 50.

timeout

Request timeout in seconds.

Value

A tibble with id, scientific_name, name, group, group_name, type, status, permalink.

Details

Hits are cached under tools::R_user_dir("obsR", "cache"). The search is not a spellchecker (a typo can return zero rows) and the API does not expose a synonym graph. Common names follow locale. There is no taxonomic tree (you cannot ask for Orchidaceae as a family).

Match the id column to species_code in a SQLite obs_df. CSV/Excel exports often have species_code as NA; filter by scientific_name instead.

Examples

if (FALSE) { # \dontrun{
obs_species("Passer domesticus")
falco <- obs_species("Falco")
obs <- obs_read("export.sqlite")
dplyr::filter(obs, species_code %in% falco$id)
} # }