r/redditdev • • Sep 15 '26

Upcoming changes to the comment ID endpoint

Hello again devs! Just a reminder on an upcoming change to how new comment IDs will change 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 details:

  • Pushshift has updated how they ingest data from Reddit and will continue to work after this change goes out
  • 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 September 28th. Let me know if you have any questions about this change.

30 Upvotes

21 comments sorted by

9

u/gschizas Sep 15 '26

Just out of technical curiosity (I don't know if this has been addressed before), how do you avoid collisions? Are new comment "thing ids" going to be always 13 characters long? Can they go as low as 8?

I mean, increase by 1 is always an easy method to avoid collisions. UUIDs/GUIDs are good as well, but they're 128-bit, not 64 bit.

9

u/redtaboo Sep 15 '26

I asked the folks in the know and they said:

This is actually a really good question! A lot of thinking has gone into the new IDs. The goal was to enable multi-region and scale out databases. But we had to ensure that had no collisions, there are multiple fields inside of the ID that guarantee it. We also considered GUIDs but we discard them to avoid the greater impact it would have in other systems as well as the community.

They're considering a post in r/redditeng at some point that will go into greater details. Will keep you posted!

9

u/Think-Memory6430 Sep 15 '26

I’m guessing Snowflake IDs is the general idea, base36 encoded: https://en.wikipedia.org/wiki/Snowflake_ID

→ More replies (1)

6

u/Watchful1 Sep 15 '26

I'm not an admin, but I'm fairly sure they are just using the same monotonic comment ids as before, which are incrementing and will never collide, and then inserting some random characters in the middle so people can't guess them.

12

u/fsv Sep 15 '26

Pushshift has been nonresponsive to onboarding requests for months. Can you offer any suggestions for mods that have been scraping by using alternatives in the meantime?

I have my access but many fellow mods do not.

5

u/redtaboo Sep 15 '26

Can you have folks struggling write into r/modsupport modmail so that team can help push things along?

→ More replies (9)

31

u/shiruken Sep 15 '26

Can't believe inflation has come for comment IDs too

2

u/emily_in_boots Sep 15 '26

Thank you u/redtaboo for making sure we are still able to access push shift for moderation needs!

I don't think the other changes will affect me at all. I never hard coded lengths for any id's or anything so that shouldn't matter.

1

u/udo_reddit_23 28d ago

I still see old comment_id. When does the changes will roll out?

1

u/Insulting_Insults 4d ago

bumping this to note that it seems like this change has broken old.reddit