The dataset viewer is not available for this split.
Error code: JobManagerCrashedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Google Maps Place ID Test Vectors
18 real places, each with the three IDs Google uses for the same location:
| Column | Example | What it is |
|---|---|---|
feature_id |
0x4870bcf37a41b8cd:0x6dbc4748b6dc2cb2 |
The ID inside Google Maps URLs (!1s0x…:0x…) |
cid |
7907273423386848434 |
The second half of the feature ID as a decimal, used in maps.google.com/?cid= links |
place_id |
ChIJzbhBevO8cEgRsizctkhHvG0 |
The Place ID used by the Places API and review links |
review_url |
https://search.google.com/local/writereview?placeid=… |
A direct "write a review" link built from the Place ID |
Use it to test code that parses Google Maps links, converts between ID formats, or builds review links.
How the data was made and checked
- Each place was opened on Google Maps and the feature ID was read from the URL.
- The Place ID was computed from the feature ID (method below).
- Every Place ID was then opened on Google Maps (
/maps/place/?q=place_id:…), and the feature ID in the resulting URL was compared with the original. All 18 matched.
All places are public landmarks, museums, venues and stadiums. No personal data is included. Checked November 2026.
Feature ID → Place ID
A Place ID is a small protocol buffers message, { 1: { 1: fixed64 a, 2: fixed64 b } }, where a and b are the two halves of the feature ID. It is 20 bytes, base64url-encoded. That's why every Place ID starts with ChIJ: it's the encoding of the fixed header bytes 0a 12 09.
Python
import base64, struct
def place_id_from_fid(fid: str) -> str:
a, b = (int(h, 16) for h in fid.split(":"))
raw = b"\x0a\x12\x09" + struct.pack("<Q", a) + b"\x11" + struct.pack("<Q", b)
return base64.urlsafe_b64encode(raw).decode().rstrip("=")
def fid_from_place_id(pid: str) -> str:
raw = base64.urlsafe_b64decode(pid + "=" * (-len(pid) % 4))
a, = struct.unpack("<Q", raw[3:11])
b, = struct.unpack("<Q", raw[12:20])
return f"{hex(a)}:{hex(b)}"
assert place_id_from_fid("0x4870bcf37a41b8cd:0x6dbc4748b6dc2cb2") == "ChIJzbhBevO8cEgRsizctkhHvG0"
JavaScript
function placeIdFromFid(fid) {
const [a, b] = fid.split(':').map(h => BigInt(h));
const bytes = new Uint8Array(20);
const dv = new DataView(bytes.buffer);
bytes.set([0x0a, 0x12, 0x09]);
dv.setBigUint64(3, a, true);
bytes[11] = 0x11;
dv.setBigUint64(12, b, true);
return btoa(String.fromCharCode(...bytes))
.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
}
Run the whole dataset as a test
from datasets import load_dataset
ds = load_dataset("Keyanen/google-maps-place-id-test-vectors", split="train")
for row in ds:
assert place_id_from_fid(row["feature_id"]) == row["place_id"]
assert int(row["feature_id"].split(":")[1], 16) == int(row["cid"])
Limitations
- The format is not documented by Google. It has been stable for years but could change.
- This covers the common
ChIJ…Place ID form only. Some Place IDs are longer and use other forms (for example ones startingEi…for addresses); they don't convert this way. - A Maps URL can contain several feature IDs (nearby places, directions points). Prefer the one after
!3m<n>!1s, then!1s.
Try it without code
Paste any Google Maps link into this free Google review link generator and Place ID finder to get the Place ID, review link and QR code in the browser.
- Downloads last month
- 110