Distinguishing between old and new Google Docs document versions using Resource ID

I’m trying to figure out how to tell the difference between older and newer Google Docs documents just by looking at their Resource ID. After examining a bunch of documents, I noticed some patterns:

For the newer version (KIX):

  • ID always begins with 1
  • Always 44 characters long

For the older version (Writely):

  • ID always starts with 0 (I’ve only seen 0Aeva… and 0ASWU6_… as prefixes)
  • Between 39 and 41 characters long

I’m thinking maybe I could use the first character (1 or 0) or the length (more than 43 characters or not) to tell them apart. But I’m not sure if this is the right way to do it.

Does anyone know if there’s an official way to differentiate between these versions using just the Resource ID? I’d really appreciate any info on this, even if it might change in the future. Thanks!

I’ve been working with Google Docs for years, and your observations about the Resource IDs are spot on. In my experience, the patterns you’ve noticed are pretty consistent. However, I wouldn’t bet the farm on them staying that way forever.

One thing I’ve found useful is to look at the document’s creation date in addition to the Resource ID. Newer docs tend to have more recent creation dates, which can be a good cross-check.

Another trick I’ve used is to open the document and check for newer features. The KIX version typically has more advanced collaboration tools and a sleeker interface.

While these methods aren’t official, they’ve served me well in distinguishing between old and new versions. Just remember, Google could change things up at any time, so it’s always good to have multiple ways to verify.

hey there! i’ve noticed those patterns too. the first character and length thing seems pretty reliable for now. but google’s always changin stuff, so who knows how long it’ll stay that way.

maybe try checkin the document properties or metadata if u can access them? that might give u more solid info on the version. just a thought!

While your observations about the Resource ID patterns are interesting, it’s important to note that relying solely on these characteristics may not be foolproof. Google’s systems are subject to change, and what seems consistent now might not hold true in the future.

A more reliable method to distinguish between old and new Google Docs versions would be to use the Google Drive API. You can make a call to retrieve the file metadata, which includes a ‘createdTime’ field. This timestamp can give you a more accurate indication of when the document was created, helping you infer whether it’s an older or newer version.

If API usage isn’t an option, your current approach of checking the first character and length could work as a quick heuristic. However, I’d recommend combining multiple checks for added reliability, such as both the starting character and the length, rather than relying on just one factor.