Accessing eBird Status and Trends data requires an access key, which can be obtained by visiting This key must be stored as the environment variable EBIRDST_KEY in order for ebirdst_download() to use it. The easiest approach is to store the key in your .Renviron file so it can always be accessed in your R sessions. Use this function to set EBIRDST_KEY in your .Renviron file provided that it is located in the standard location in your home directory. It is also possible to manually edit the .Renviron file. The access key is specific to you and should never be shared or made publicly accessible.

set_ebirdst_access_key(key, overwrite = FALSE)



character; API key obtained by filling out the form at


logical; should the existing EBIRDST_KEY be overwritten if it has already been set in .Renviron.


Edits .Renviron, then returns the path to this file invisibly.


if (FALSE) {
# save the api key, replace XXXXXX with your actual key