Skip to content

re: Detecting DEV peak hours via API (bash study) VIEW POST

re: Wow. I motivated to build app that get random posts from Dev. I see in, JSON only get 30 posts. Can I reach ...

Hi, I think yes, though it is not documented. Source code contains per_page parameter which governs amount of articles in the response.

For example:

However, probably it is not good idea to load very large responses (don't know if there is limit). Rather use page parameter to send several requests to different pages. E.g.


Then, how to get 10 posts from Dev randomly? 😂

Oh. I got idea:

  • Get number of total posts (eg: 1000)
  • Get 10 number randomly from 0 to 1000

Yep. Good idea! Just exactly what is described in this article above :)

code of conduct - report abuse