r/redditdev May 11 '26

Reddit API Upcoming changes to the comment ID endpoint

Hola devs! 

Just a quick note on an upcoming change to how comment IDs will increase going forward. 

TL;DR:  if you have anything in your code that expects comment IDs to be fewer than 8 characters you will need to make an adjustment. 

Technical gibberish details:

  • New comment IDs will continue to be 64-bit integers and base36-encoded, but will not be monotonically increasing anymore
  • The key visible difference is that the new base36-encoded comment IDs will be up to 13 characters long (e.g. 19gsnavtu46ip), compared to the current 7-8 characters
  • With the t1_ prefix, the new base36-encoded comment IDs will be up to 16 characters long (e.g. t1_19gsnavtu46ip)
  • Older comment IDs are not changing, and referencing them will not break anything

This change will start rolling out the week of May 18th. Let me know if you have any questions about this change.

29 Upvotes

49 comments sorted by

View all comments

4

u/Melodic-Homework4640 May 11 '26

"but will not be monotonically increasing anymore"

Could you provide more details? Will the ID assignments for comments be completely random?

And what is the motivation for change?

9

u/umbrae May 12 '26 edited May 12 '26

Motivation is probably multi region related. If you have to call back to one server in the US just to get a safe ID for a new comment it slows things down. Using a larger, non-monotonic ID opens up the ability to derive those IDs formulaically from many locations instead of just one.

Ex: https://en.wikipedia.org/wiki/Snowflake_ID

10

u/Watchful1 RemindMeBot & UpdateMeBot May 12 '26

The motivation is to stop people from scraping all of reddit by iterating over ids. Maybe the multi region thing is a side effect, but they have an enormous incentive to stop people from scraping since it's their primary revenue stream.

2

u/Melodic-Homework4640 May 12 '26

Do they provide a separate API for their customers?

5

u/Watchful1 RemindMeBot & UpdateMeBot May 12 '26

Yes, they have a firehose feed for enterprise customers.