everybird is almost a year old. With 950 followers it’s my most popular Twitter bot, and roughly twice as popular as my own personal account. Such is life.
everybird was inspired by everyword, an excellent bot that posted every word in the English language. If words, why not birds? Anything is possible if you believe.
There’s nothing new under the sun, and when I searched for everybird it turned out someone had done the same thing before me here. This version only posts the scientific name of birds, though. Probably neat if you’re a bird scientist and you already know all the birds by their latin name but not so great for non-bird people. I thought I’d make my version a bit fancier and useful by posting a picture of each and every bird, alongside the bird’s common name and scientific name.
HOW IT WORKS
The first step in posting every bird is pretty simple: find a list of every bird. Googling “list of every bird” brought me to SIBLEY AND MONROE’S WORLD LIST OF BIRDS. As I’m not a bird scientist–truthfully I barely know anything about birds–I can’t be sure if this list is accurate, but at almost 10,000 birds it seemed to be comprehensive if not complete. I wrote a script to scrape this list into a .JSON.
For images I call the Bing image search API, which is far better than Google’s image search API in that it exists and you can access it. Pretty straightforward, and from there I simply format the bird’s names and number and send the entire post to the Twitter API.
There’s no backend for everybird. When it’s time to post a new bird it simply looks at its own Twitter timeline to scrape the number of the last bird, increment by one, and then post the next bird in the line.
THINGS CHANGE
This was the first bot I created that gained any sort of a following. As such, I’ve felt a sense of duty to keep the birds flowing as best I can, as there’s a non-zero amount of people who would be upset if this account stopped posting birds. In service to this fowl goal I’ve had to make a few changes to the bot since it launched.
When the bot first launched I was searching Bing for the bird’s scientific name, but later changed it to the common name as the image results seem to be of a higher quality. This had lead to embarrassing situations like posting Obama’s daughter Malia. That happens very rarely, and I’d estimate that the incidence of non-birds posted is around 0.5% which ain’t too shabby.
The bot also used to pull the very first image result, although sometimes this would lead to an image with a redirect issue that would cause the entire program to fail. I got around this by picking one of the first 5 images at random and changing the bot’s posting interval. So, if it’s been more than 4 hours since a bird post then the bot will attempt to post every 10 minutes (currently the smallest interval allowed by Heroku’s free hosting). If it fails, it’ll simply try again in 10 minutes. Since making this change there’s been zero “downtime” that I’ve had to fix manually (I admit a few of these birds were posted by me–if I’m on vacation or away from my computer it’s the easiest way to keep the birds flowing).
Finally, when you start something like this any success seems so far away. Around bird number 995 I made sure that it would work with birds in the four digits.
DEATH OF EVERYBIRD
Well, not really, but it should be done posting birds in 2019. That’s kind of a long ways away but we still have more than 8,000 birds to post.
I’m considering making it post every two hours which would cut down the remaining time significantly but I don’t want to overwhelm anyone’s timeline with feathery friends. I’m also a bit worried about changes to the Bing or Twitter APIs between now and then but we’ll cross those bridges when we get to ‘em.
Cheers, and enjoy the birds!