Take the 2-minute tour ×

Freebase's Python API uses GUIDs that have a set prefix and a zero-padded suffix:

"guid":"#9202a8c04000641f8000000000211f52" (http://wiki.freebase.com/wiki/Guid)

"Freebase guids are represented with 32 hexidecimal characters, the first 17 are the graph prefix and the remaining 15 are the item suffix" (http://tinyify.freebaseapps.com/).

This format enables the GUID to compress down for short URLs.

How do you construct GUIDs like this?

share|improve this question
add comment

1 Answer

You'd need to look at the source for Freebase where it generates that GUID. It's definitely not a standard RFC GUID of any sort.

share|improve this answer
I haven't been able to find it -- I don't think that part is public. –  espeed Apr 14 '11 at 11:45
<shrug> then if you want to build something similarly compatible, take a UUID4 and zero out the appropriate range, or substitute with numbers that make sense in your context. The dirty little secret is that UUIDs are very often just random numbers that are very unlikely to collide. –  Paul McMillan Apr 14 '11 at 20:17
add comment

Your Answer


