Show HN: Dog API (dogapi.dog)
Hello there, happy holidays.
I've been maintaining for 6 years this Dog API that only returned facts. I recently rewrote the project to make it more flexible [1] and I had a blast doing so.
This API has been used by a lot of computer science students, as well as bots and other 3rd party services that integrated in the past. The old endpoint receives around 1,000-1,500 requests per day, which makes me happy.
The goal is to extend it to make it more interesting and usable, I collect dog data in my spare time. I'm not looking to monetize it, it's just for the love of education.
Feel free to use it, and share it!
78 comments
[ 2.3 ms ] story [ 227 ms ] threadOf course if you want to use this as a learning project for writing and using APIs... that takes precedence ;-)
Also: is the data open source? Can we contribute to that too, e.g. send a PR?
The main goal is to expose a fun API, and then be as accurate as possible. I'm working on the latter.
I mention this only because it's not very clear to me if you'll be providing an endpoint for v2 or this is no longer the case and people are expected to install their own server, as the README on the repository suggests.
Other than that, thanks. It looks like a nice tool to have for teaching :)
[1]: https://github.com/kinduff/dogapi.dog#contributing
[2]: https://github.com/sponsors/kinduff
https://randomuser.me/api/
(I'm writing on an open source tool to help people do this with files in Git repos. https://pypi.org/project/DataTig/#data )
An example on the homepage would be nice. Maybe something about Laika (https://en.wikipedia.org/wiki/Laika)
> Laika died within hours from overheating, possibly caused by a failure of the central R‑7 sustainer to separate from the payload. The true cause and time of her death were not made public until 2002; instead, it was widely reported that she died when her oxygen ran out on day six or, as the Soviet government initially claimed, she was euthanised prior to oxygen depletion.
There seems to be little reason to lie about this given Laika's survival was already nil.
Yes.
Which is relevant history to your question, because SOP for the USSR/RSFSR is very different from SOP for the current government. The current gov is corrupt and lies, but has entirely different motivations than the government that lied for 34 years about Laika.
For example, a student could learn that they need to use a API (with all of the API problems: latency, server down, throttling, blah blah blah) when all they really need to do is download a sqlite file, hook up sqlite to their application, run one query - and have a vastly simpler application. This could be as little as 10-50 lines of code. Never underestimate the power of shipping data via sqlite files.
(Yes, RDF has got a bit of a bad rap in some circles, but I don’t think it’s entirely justified… More importantly, RDF is incredibly boring, so publishing such a dataset is likely to gather much less attention than releasing a free public API, at least here.)
I've shipped some data in a JSON file bundled with an application, because it didn't change a lot, and we had frequent (biweekly) releases anyway. I mistakenly assumed those two things would always be true.
As time went on, the frequency of necessary changes increased but our overall products release cadence got worse and worse (many months) as the product grew. So customers had continually outdated data.
An additional problem I didn't expect is that since we wanted to get customers the latest data (because the next release was so far out), we had to update the data set as close to release as possible. So always a change at the last minute, which is already a busy time and means it's not really tested well. And also it was extra toil; we had a script for data generation but it still needed a manual run and pull request. In the time I spent running this I could have easily written an API based version several times.
Another problem was that this change had to be made for every release, including bugfix ones. This caused frequent discussion (do we need this?), was forgotten a few times, and caused merge conflicts later which were annoying because in this case the proper way to merge was to ignore both ancestors and rerun the script, which people weren't used to.
Of course I rewrote it eventually (after convincing PM that I need time for this supposedly long done feature again), but then I had to deal with the extra problem of customers who had local customer specific modifications of the file (because that was the workaround our support staff came up with as a way to deal with the outdatedness).
Thankfully, a problem I did not habe was binary data in git. The commits were ugly but at least still got ok diffs (once we sorted the JSON file properly). But you mentioned SQLite, which is not a good match for git. Of course one can work around it by merging the raw SQL, but still, yet another pitfall.
Photos are taken from https://dog.ceo/dog-api/, a similar project.
Can this dog API do that? If so, that would be a huge "selling" point
https://cataas.com/#
JSONAPI is too complicated at first, then exactly as complicated as is useful over time.
https://github.com/Looskie/capybara-api
(The other one seems to give a CDN error these days)
https://gimmeadog.khoanguyen.me/
Wait - maybe not a good name after all.
Would love to hear more about this.
To make it useful I tried filter on characteristics that a buyer would be interested in such as long-haired vs. short.
I also gathered the data manually. I'll have to compare datasets
https://www.canadapups.com/breeds
> The initial price to apply for a new gTLD was $185,000. ICANN expected the new rules to significantly change the face of the internet. Industry analysts predicted 500–1000 new gTLDs, mostly reflecting names of companies and products, but also cities, and generic names like bank and sport.
> ..Esther Dyson, the founding chairwoman of ICANN, wrote that the expansion "will create jobs [for lawyers, marketers and others] but little extra value."
https://en.wikipedia.org/wiki/Generic_top-level_domain#New_t...
IPFS is an alternate solution, but as addresses are not updatable someone somewhere needs to keep track of where the canonical source is. Further, there is no API built in - the data would live at some address, but someone still needs to construct a way to get it without just downloading the whole data dump at once. Perhaps you shard across different files but that has its own issues.
On chain with Ethereum, you can use a smart contract which allows CRUD operations on the data on a per item basis. The latest version of the smart contract data is clear. The API is basically set with the smart contract - infra to get that has already been built with libraries like ethers, and will continue to be maintained since there are other contracts/products out there that rely on the same infra.
Sometimes a tiny lil' db is all you need to serve some nice cacheable data :)