webmention.io
webmention.io copied to clipboard
Document /api/count.json endpoint
Rendering like and response counts is a pretty common UI pattern on blogs, for example:

Right now, to render the counts I have to fetch all pages of webmentions, even if I don't want to show the actual webmentions until the person clicks on the "XYZ responses", nevermind paginating them.
It would be awesome if the API had an endpoint to get the counts of mentions per type for a specific page, for example I imagine something like this:
$ curl https://webmentions.io/api/mention-counts.jf2?target=bla.com
{
"like-of": 295,
"in-reply-to": 33,
"repost-of": "186,
"mention-of": 41,
"bookmark-of": 11
}
It's already there, just apparently not in the readme! The endpoint is /api/count.json
That's perfect, thank you!
This has been added to the home page for some time now
https://webmention.io/#display-mention-counter