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

@unclesamulus/xeno-canto-api

v1.0.1

Published

Damn small node.js library to deal with v3 Xeno-Canto API

Readme

xeno-canto.js

Node.js implementation of xeno-canto API 2.0 Easy simple/advanced searches against xeno-canto database.

"The service provides a database of bird song and sound recordings contributed and maintained by enthusiasts worldwide.It provides access to search the connection and play or download recordings and to submit new recordings. Discussion forums encourage interactions among members of the birding community to exchange information about bird song and related topics.

API methods support search against the database by specifying the formal Latin name of a bird species. Returned data provide listings of all recordings maintained by the service for that species, either with or without URLs for audio and still image files, or optionally a request can retrieve a single representative recording. Methods also provide summary statistics about listings relevant to the species named in the request."

Installation

$ npm install @unclesamulus/xeno-canto.js

Usage

Get an API key on your Xeno-Canto account and create a dotenv file with the following content:

XENO_CANTO_API_KEY=secret
// Load dotenv config
require('dotenv').config();

require('@unclesamulus/xeno-canto.js')(XENO_CANTO_API_KEY);

/** A simple search with species name 
 * the result is passed in promise
 */
XenoCanto.search('sp:"Erithacus rubecula"')
        .then(data => {
            console.log(data.numRecordings);
        }).catch(error => {
            console.error(error);
            throw error;
        });

Response Properties

  • numRecordings: the total number of recordings found for this query
  • numSpecies: the total number of species found for this query
  • page: the page number of the results page that is being displayed
  • numPages: the total number of pages available for this query
  • recordings: an array of recording objects, described in detail below

Recording object properties

  • id: the catalogue number of the recording on xeno-canto
  • gen: the generic name of the species
  • sp: the specific name of the species
  • en: the English name of the species
  • rec: the name of the recordist
  • cnt: the country where the recording was made
  • loc: the name of the locality
  • lat: the latitude of the recording in decimal coordinates
  • lng: the longitude of the recording in decimal coordinates
  • type: the sound type of the recording (e.g. 'call', 'song', etc). This is generally a comma-separated list of sound types.
  • file: the URL to the audio file
  • lic: the URL describing the license of this recording
  • url: the URL specifying the details of this recording
/** Advanced search */

var query = {
	name:'orthonyx',
	country: 'papua',
	location: 'tari'
};

XenoCanto.search(query).then(data => {
	// inspect the response object
	console.log(self.entity);
});

Advanced search parameters

  • name [string] commong english name, scientific name, or family latin name
  • genus [string]
  • recordist [string] recordist name
  • country [string]
  • location: [string]
  • remarks: [string]
  • coords: [object] {lat [string], lon [string]}
  • also: [string]
  • type: [string]
  • nr: [string] catalog number
  • quality: [string]
  • qualitylt: [string] quality less than
  • area: [string]

References

Release History

  • 2025-10-30 - v0.0.5 Enable Xeno-Canto API v3 - @sortion
  • 2022-08-19 - Update dependencies and fix tests to suit to newly xeno-canto collected recordings - @sortion
  • 2018-02-07 - v0.0.4 Fixing communication with xeno-canto api - Thanks @camilokorea
  • 2014-03-07 - v0.0.3 Adjust API endpoint - Thanks @rowanoulton
  • 0.0.2 Implements advanced searches.
  • 2013-11-12 xeno-canto inception, basic search 0.0.1

License

Copyright (c) 2013 Patrick De Marta Licensed under the GNU GPL license .