DEV Community

George Jempty
George Jempty

Posted on

Where can I find a list of *all* dev.to's tags

Maybe I'm over-looking something obvious, but when I search I only find the page with the top 100 tags (https://dev.to/tags) but I'm wondering where I can find all the tags, thanks

Top comments (2)

Collapse
 
potherca profile image
Ben Peachey

As always, one has to be careful what one askes for... At the time of this writing "all" means 44676 tags.1

The tags can be found at dev.to/api/tags.

By default this will only return the top 10 most popular tags.

This number can be increased to 1000 by using the per_page parameter.

Subsequent pages can be retrieved by using the page parameter.

Just keep increasing the page number until the JSON response is an empty array [].2

To give an idea how this could be done, I created this Gist: gist.github.com/Potherca/da6e1cfec...

It can be seen in action here: bl.ocks.org/Potherca/raw/da6e1cfec...

Right now the last page is dev.to/api/tags?per_page=1000&page=45. No doubt it will soon be page 46.

At this point, you might be wondering how I knew about the API... Well, I didn't. When searching the source-code on Github, I found the API controller for tags: github.com/thepracticaldev/dev.to/...

With a bit of effort, I figured the rest out from there. 😄


1 Visit bl.ocks.org/Potherca/raw/da6e1cfec... if you want a real-time count.

2 An empty array means there are no more tags to be retrieved.

Collapse
 
russ profile image
Russ

Maybe add the #discuss and #help tags to this?