npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ebird

v2.0.2

Published

ebird website scraper

Downloads

52

Readme

ebird

This package is an api to ebird data. It uses web scrapers to pull data from the ebird site.

Installation

    npm install ebird

Usage

var ebird = require('ebird');

// Create a new instance of the ebird api.
var instance = new ebird();

// Authorize with an ebird username and password
instance.auth(username, password).then(() => {
    // Once authorized, query for regions or another metric.  
    instance.regions().then(results => {
        console.log('Regions', JSON.stringify(results));
    });

    // Request countries in paralle with regions.
    instance.countries().then(results => {
        console.log('Counties', JSON.stringify(results));
    });
});

API

constructor ebird(opt_sessionToken)

Constructs an instance of the ebird api. var instance = new ebird(); If you have a ebird session token you can pass that in the constructor var instance = new ebird(sessionToken);.

auth(username, password) returns sessionToken

Authenticates an ebird instance. Returns a session token so you can skip full auth when using a different ebird instance. Ebird uses phantom js to log in, which can be flaky. To receive better reliability save the session token between uses to avoid instantiating phantom js.

totals

totals.regions() totals.countries() totals.states() totals.counties()

This functions all work the same. They return a personal list of counts for a user for the given location.

{
    "name": place_name,
    "code": ebird_code,
    "items":[
        {
            "number": count,
            "time": time_frame_string,
        }
        ...
    ]

lists

list(ebird_code, time_frame_string, opt_year)

Retrieves an array of objects for a bird list.

// Example response. ebird.list('US-CA', 'life');
[
    {
        commonName: "Black-bellied Whistling-Duck",
        date: "24 Apr 2015",
        location: "Baytown Nature Center (UTC 039)",
        rowNumber: "1",
        scientificName: "Dendrocygna autumnalis",
        sp: "US-TX",
        speciesCode: "bbwduc",
    },
    ...
]

alerts

alerts.needs(code) alerts.rarities(code)

Returns an array of sightings for either a needs or a rarities list.

{
    species: {
        name: 'Pin-tailed Whydah ',
        scientificName: 'Vidua macroura'
    },
    confirmed: true,
    count: '1',
    date: 'Apr 2, 2016 08:40',
    location: {
        name: 'Peck Rd. Water Conservation Park ',
        lat: '34.10053',
        long: '-118.01333'
    },
    checklist: 'http://ebird.org/ebird/view/checklist?subID=SUB_ID',
    county: 'Los Angeles',
    state: 'California, United States',
    observer: 'eBirder User',
    details: '',
}

targets

targest.species(options)

Returns an array of species and frequencies for a user's target birds

Options

location: Location Code.
startMonth: Month number 1-12.
endMonth: Month number 1-12.
locationFilter: Location code, 'aba', or 'world'.
timeFilter: 'life', 'year', 'month', or 'day'.

Results

{
    species: {
        name: 'Yellow Warbler',
        code: 'yelwar'
    },
    frequency: 5.77985,
    map: 'http://ebird.org/...',
}