DEV Community

Discussion on: What is the best time to post on dev.to? a data-backed answer 🕰🦄🤷‍♂️

Collapse
 
shindakun profile image
Steve Layton

Very cool! You can probably refactor it to use the "paged" articles. This will give you a set of 30 public article IDs per page so you don't have to scrape 94k IDs directly. You can just loop through the ~500 pages https://dev.to/api/articles/?page=468 to grab the IDs. A cool thing about dev.to is since it's open source the API may not be documented but is available to view github.com/thepracticaldev/dev.to/.... Can't wait to see more!

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

The articles api seems to return only articles with the defaults tags career discuss productivity

github.com/thepracticaldev/dev.to/...

Collapse
 
shindakun profile image
Steve Layton

I'd have to double check but I believe that's only during "onboarding" when a user first signs up. If not that's likely a bug in my mind.

Thread Thread
 
alfredosalzillo profile image
Alfredo Salzillo

I've done a runkit how check if the most recent react article is published after the most recent article, if so, check if it is in the latest 30 articles.

runkit.com/alfredosalzillo/5c9ba0d...

https://thepracticaldev.s3.amazonaws.com/i/pc21sepjr24fli4ovist.PNG

The react article, published after the most recent article (of the dev.to/api/articles/) isn't in the articles list.

It may be a bug of the api.

Collapse
 
daolf profile image
Pierre

Thanks, did not know about this endpoint. Will use it for my next one.