| name | ebird-query |
|---|---|
| description | Query the eBird API to answer birdwatching questions. Use this skill whenever the user asks about birds, bird sightings, birdwatching locations, recent observations, rare birds, hotspots, species lists, or anything related to eBird data. Trigger on phrases like "where can I see [bird]", "what birds are in [location]", "recent sightings", "rare birds near me", "birding hotspots", "eBird", "鳥", "賞鳥", "野鳥", or any conversation about bird species and their locations. Also trigger when the user asks about top eBird contributors, checklist statistics, or notable observations in a region. Even if the user doesn't mention eBird explicitly, if they're asking about real-world bird sighting data or where to find specific species, use this skill. |
This skill lets you query the eBird API 2.0 to answer birdwatching questions. You can look up recent observations, find hotspots, search for specific species, discover rare/notable birds, and get regional statistics.
The user needs an eBird API key. If they haven't provided one yet in this conversation, ask them to paste it.
API keys are free — users can register at https://ebird.org/api/keygen
IMPORTANT — API key must never appear in plaintext in terminal commands. Follow this procedure:
- After the user provides a key, write it to a temp file:
cat > /tmp/.ebird_env <<< "export EBIRD_API_KEY=<key>" - Source it before every command:
source /tmp/.ebird_env && python ebird_api.py ... - Never use the
--key <key>flag or inlineEBIRD_API_KEY=<key> python ...syntax — both expose the key in terminal output
Run the bundled Python script ebird_api.py (located in this skill's directory) to make API calls. The script reads the API key from the EBIRD_API_KEY environment variable, so always source the key file before running.
source /tmp/.ebird_env && python /path/to/ebird_api.py <command> [options]Find what birds have been seen recently in a region.
source /tmp/.ebird_env && python ebird_api.py recent --region TW --back 7 --locale zh--region: eBird region code (e.g.,TW,JP,US-NY,TW-TPE)--back: Number of days back (1-30, default 14)--locale: Language for common names (defaulten, usezhfor Chinese)--max: Max results (default 50)--hotspot: If set, only include observations from hotspots--category: Filter by category (e.g.,species,hybrid)
Find what birds have been seen near a specific location.
python ebird_api.py nearby --lat 25.03 --lng 121.56 --dist 25 --back 7--lat,--lng: Coordinates (required)--dist: Search radius in km (default 25, max 50)--back: Days back (1-30, default 14)
Find rare or unusual species reported in a region.
python ebird_api.py notable --region TW --back 14python ebird_api.py nearby-notable --lat 25.03 --lng 121.56 --dist 50Find where a specific species has been seen recently.
python ebird_api.py species --code barswa1 --region TW--code: eBird species code (e.g.,barswa1for Barn Swallow). Use thetaxonomycommand to look up codes.
python ebird_api.py nearby-species --code barswa1 --lat 25.03 --lng 121.56Find popular birdwatching locations.
python ebird_api.py hotspots --region TW-TPEpython ebird_api.py nearby-hotspots --lat 25.03 --lng 121.56 --dist 25Look up species codes and scientific names. Useful when you need the species code for other commands.
python ebird_api.py taxonomy --species "Barn Swallow"
python ebird_api.py taxonomy --species "黑面琵鷺" --locale zh--species: Common or partial name to search for--locale: Language of the name you're searching
python ebird_api.py hotspot-info --loc L1234567python ebird_api.py historic --region TW --date 2025-01-15python ebird_api.py top100 --region TW --date 2025-01-15python ebird_api.py stats --region TW --date 2025-01-15python ebird_api.py sub-regions --region TW --type subnational1--type:subnational1(states/counties) orsubnational2(cities/districts)
python ebird_api.py nearest-species --code bkfspo1 --lat 25.03 --lng 121.56--code: eBird species code (required)--lat,--lng: Coordinates (required)--dist: Search radius in km (default 25, max 50)--back: Days back (1-30, default 14)--max: Max results (default 50)
python ebird_api.py recent-checklists --region TW --max 10--region: eBird region code (required)--max: Max results (1-200, default 10)
python ebird_api.py checklist-feed --region TW --date 2025-01-15 --sort-key obs_dt--region: eBird region code (required)--date: Date in YYYY-MM-DD format (required)--sort-key: Sort byobs_dt(observation date) orcreation_dt(creation date), defaultobs_dt--max: Max results (1-200, default 10)
python ebird_api.py species-list --region TW--region: eBird region code (required)
python ebird_api.py view-checklist --sub-id S22893621--sub-id: Checklist submission ID (required, e.g. S22893621)
python ebird_api.py taxonomy-forms --code barswa1--code: eBird species code (required)
python ebird_api.py taxonomy-versionsNo additional parameters required.
python ebird_api.py taxonomy-groups --ordering ebird --locale zh--ordering:ebirdormerlin(defaultebird)--locale: Language for group names (defaulten)
python ebird_api.py taxonomy-localesNo additional parameters required.
python ebird_api.py region-info --region TW --format full--region: eBird region code (required)--format: Name format —detailed,detailednoqual,full,namequal,nameonly,revdetailed(defaultfull)
python ebird_api.py adjacent-regions --region US-NY-061--region: eBird region code (required). Best supported for US/NZ/MX subnational2 codes.
eBird uses hierarchical region codes:
- Country:
TW(Taiwan),JP(Japan),US,GB, etc. - State/County:
TW-TPE(Taipei),JP-13(Tokyo),US-NY(New York) - Sub-region:
US-NY-061(New York County) - Location:
L1234567(specific hotspot ID)
If the user mentions a place name instead of a code, help them figure out the right code. You can use sub-regions to discover valid sub-region codes, or look up the region code from your knowledge.
TW-TPETaipei City,TW-NWTNew Taipei,TW-KEEKeelungTW-TAOTaoyuan,TW-HSZHsinchu City,TW-HSQHsinchu CountyTW-MIAMiaoli,TW-TXGTaichung,TW-CHAChanghua,TW-NANNantouTW-YUNYunlin,TW-CYIChiayi County,TW-CYQChiayi CityTW-TNNTainan,TW-KHHKaohsiung,TW-PIFPingtungTW-ILAYilan,TW-HUAHualien,TW-TTTTaitungTW-PENPenghu,TW-KINKinmen,TW-LIELienchiang (Matsu)
eBird region codes only go down to county level. For townships or specific locations (e.g., 布袋, 鰲鼓, 七股), there is no region code. Use coordinates with nearby series commands instead. Look up approximate coordinates from your knowledge and use --dist to set an appropriate radius.
When presenting results to the user:
- Summarize clearly in conversation — don't dump raw JSON. Pull out the interesting bits: species name, location, date, count.
- Use the user's language — if the user writes in Chinese, respond in Chinese and use
--locale zhwhen available. - Be a helpful birding companion — if the user asks "where can I see a Black-faced Spoonbill", first look up the species code via taxonomy, then query recent observations or nearby-species. Chain multiple calls as needed.
- Handle errors gracefully — if a species code is wrong or a region code is invalid, explain and suggest alternatives.
- Suggest follow-ups — after showing results, you might suggest checking nearby hotspots, looking at notable birds, or broadening the search area.
Many user questions require chaining multiple API calls:
- "Where can I see [bird]?" →
taxonomy(get code) →speciesornearby-species - "[specific location] 的 [bird]" →
taxonomy(get code) →nearby-species(use coordinates of that location) - "What rare birds are near me?" →
nearby-notable(with user's coordinates) - "Best birding spots in [area]?" →
hotspots→ optionallyrecentfor top hotspots - "What birds are at [hotspot]?" →
recentwith the hotspot's region or location ID - "Who are the top birders in Taiwan today?" →
top100