Menu

1 / 2

I Hit dev.to's Rate Limit Mid-Batch — Here's the 35-Second Fix

DEV Community·孫昊·7 months ago
#KTfvaNi2
#api#ratelimit#time#self#article
Long article (855 words) — no AI summary yet.
Reading 0:00
15s threshold

TL;DR : dev.to's API allows ~1 article per 30 seconds. Trying to batch-publish 6 articles in 18 seconds hit 429 Rate limit reached, try again in 30 seconds . The fix: 35-second delay between requests + 3-attempt retry per article.

The error I hit

# This fails on article #3 for article in articles : requests . post ( " https://dev.to/api/articles " , json = payload , ...) time . sleep ( 2 ) # ← too short

Enter fullscreen mode

Exit fullscreen mode

After 2 successful publishes, I got:

{ "error" : "Rate limit reached, try again in 30 seconds" , "status" : 429 }

Enter fullscreen mode

Exit fullscreen mode

For all 4 remaining articles. Same response, no exponential backoff hint.

What works

import time , requests

def publish_with_retry ( article_payload , max_attempts = 3 , retry_wait = 35 ): for attempt in range ( max_attempts ): r = requests .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.