On the morning of November 18, 2026, I set a timer and looked up the Google entity ID for OpenAI. Its Wikidata item, Q21708200, gave it up in under a minute: /g/11bxc656v6. Then I ran the same lookup on Anthropic, a company with far more press than most of our clients will ever see. Its Wikidata item, Q116758847, listed two Google Knowledge Graph IDs, /g/11nn47s4yv and /g/11csrrqr2z.
Two IDs for one company is the kind of thing you never notice until an AI answer gets your founding date wrong. That is why the lookup is worth two minutes of your week. This guide shows how to find KGMID codes three ways, from the no-setup browser trick to a one-line API call, and then shares what the test turned up across five well-known brands.
If you want the background first (what the /m/ and /g/ prefixes mean, and why AI assistants care), read what a KGMID is and come back.
Method 1: Copy it from the knowledge panel

This is the fastest route, and it needs nothing but a desktop browser. The catch is that it only works when Google already shows a knowledge panel for the name.
Search your exact company or personal name on google.com. If a panel appears on the right side of the results, click its share icon and copy the link. Google hands you a short link that begins with g.co/kgs/. Paste that short link into a new tab and press Enter. When the page loads, look at the full URL in the address bar. Somewhere in it you will find a kgmid parameter followed by an ID that starts with /m/ or /g/.
The slashes may appear encoded as %2F, so /g/11bxc656v6 can show up as %2Fg%2F11bxc656v6. Swap each %2F back to a slash before you save it.
There is a second browser trick that works even without a panel, as long as Google Trends knows the topic. Go to trends.google.com, type the name and look at the suggestions. Pick the one labeled as a topic (for a business it often reads “Company”) rather than “Search term.” Trends builds the topic URL from the entity ID, so the address bar will show a /m/ or /g/ string after q=. Copy it and decode the slashes the same way.
One more thing to watch in this step. If the panel you see includes a map, opening hours and reviews, you are looking at a Google Business Profile, not a Knowledge Graph entity panel. Business Profiles are managed through a separate system, and their share links may not carry a kgmid parameter at all. A local business can have both, and they are worth checking as separate records.
Both tricks have the same weakness. They show you the ID Google chose to display for one query. They do not tell you whether a second ID exists for the same entity. For that, you need Method 2 or Method 3.
Method 2: Read it off Wikidata
Wikidata stores Google entity IDs as two separate properties, and this split trips people up. The Freebase ID property, P646, holds the older /m/ codes. The Google Knowledge Graph ID property, P2671, holds the newer /g/ codes. Wikidata’s own description of P2671 says it is for IDs “starting with ‘/g/’” and tells editors to use P646 for anything that starts with /m/.
Go to wikidata.org and search the name. Open the item that matches (check the description line under the title to make sure you have the right one, not a namesake). Scroll down to the Identifiers section. Look for the rows labeled “Freebase ID” and “Google Knowledge Graph ID.” If either row lists more than one value, you have found a possible split.
On scale, this is the best free index of Google IDs anywhere. A count I ran against the Wikidata query service on November 18, 2026 returned 4,470,136 items with a Freebase ID and 8,181,926 items with a Google Knowledge Graph ID.
The weakness here is that humans and bots add these values. A value can be stale, missing or attached to the wrong item. And plenty of smaller companies do not have a Wikidata item at all, which is its own signal. If yours does not, read our guide to Wikidata notability before you try to create one, because a deleted item can do more harm than none.
Treat Wikidata as a strong lead, then confirm it with Method 3.
How do you find a KGMID with the API?

The Knowledge Graph Search API is Google’s own read-only window into the graph, and it is the most direct answer to how to find KGMID values when no panel shows. You need a Google Cloud project with the API turned on and an API key. Google allows up to 100,000 read calls per day per project at no charge, which is far more than any brand audit will use.
From a terminal, one request does the job. Replace YOUR_KEY with your key and the query with your name:
curl "https://kgsearch.googleapis.com/v1/entities:search?query=OpenAI&types=Organization&limit=3&key=YOUR_KEY"
The types filter keeps out the novel, the band and the racehorse that might share your company’s name. In the JSON that comes back, find the @id field on each result. It will read something like kg:/g/11bxc656v6. Strip the kg: prefix and the rest is the entity ID.
To check an ID you already have, pass it with the ids parameter instead of a query, as in ids=/g/11bxc656v6. If the API returns the entity, the ID still resolves. If it returns nothing, the record may have been merged or dropped.
You can also read Wikidata from the same terminal without any key. This is the command I used for the test below, swapping in each item number:
curl -s "https://www.wikidata.org/wiki/Special:EntityData/Q21708200.json" | grep -o '"P2671"'
The grep tells you whether the property exists. To print the actual values, a few lines of Python do it:
import json, urllib.request
q = "Q21708200"
url = f"https://www.wikidata.org/wiki/Special:EntityData/{q}.json"
e = list(json.load(urllib.request.urlopen(url))["entities"].values())[0]
for p in ("P646", "P2671"):
print(p, [c["mainsnak"]["datavalue"]["value"] for c in e["claims"].get(p, [])])
Swap the item number and run it for each entity on your list. It takes seconds, and it is how I built the table in the next section. Google warns that the Knowledge Graph Search API is not meant for production-critical services and is moving toward Cloud Enterprise Knowledge Graph, so use it for audits, not for a live feature. Our full walkthrough of the Google Knowledge Graph Search API covers the response fields in detail.
What my November 18 test turned up
I pulled the public Wikidata records for five well-known companies on November 18, 2026 and recorded every Google entity ID each one listed. Here is the raw result.
| Company | Wikidata item | Freebase ID (P646) | Google KG ID (P2671) |
|---|---|---|---|
| Q95 | /m/045c7b | none listed | |
| IBM | Q37156 | /m/03sc8 | none listed |
| Apple Inc. | Q312 | /m/0k8z and /m/04st9hr | none listed |
| OpenAI | Q21708200 | none listed | /g/11bxc656v6 |
| Anthropic | Q116758847 | none listed | /g/11nn47s4yv and /g/11csrrqr2z |
Three patterns stand out. First, age decides the prefix. Every company that existed in the Freebase era carries a /m/ ID, and the two founded later carry /g/ IDs. Second, no company in the sample carried both, which fits Wikidata’s rule of filing each prefix under its own property. Third, two of five records listed more than one ID. That ratio comes from a five-company sample, so do not read it as a rate. What it does show is that duplicate entity IDs happen even to brands with enormous coverage.
The totals from the same day put the sample in context. Wikidata holds about 8.2 million items with a /g/ ID and about 4.5 million with a /m/ ID, so the newer format already outnumbers the old one almost two to one. If your company was founded after 2016, assume you are looking for a /g/ code, and treat a /m/ result as a sign you may have matched an older namesake.
What the table cannot show is which ID Google treats as primary. Wikidata records what editors have found, not Google’s internal ranking. To see which one Google surfaces today, run each ID through the API’s ids parameter and through a Google search with the kgmid parameter, then compare what comes back.
Found nothing, or found two?
The three methods give you one of four results, and each one points to a different next move.
One ID that every method agrees on is the healthy case. Write it down with the date, add it to your brand fact sheet, and recheck it each quarter.
Keep that record in a plain sheet with five columns: the entity name, the ID, the method that found it, the date you checked, and whether it still resolved in the API. A sheet like that turns a one-time lookup into an early warning. When a value changes between quarters, you will see it in a row instead of hearing about it from a client who asked ChatGPT about you.
One ID in the API but nothing in Wikidata means Google knows you and the open web’s main reference base does not. That gap matters for AI assistants that lean on Wikidata, so it is worth closing if you meet the notability bar.
No ID anywhere means Google has not minted an entity for you. The fix is upstream: consistent facts on your own site, structured data that names your official profiles, and independent coverage that describes you in the same words. Our explainer on what a KGMID is lays out the four layers to build in order.
Personal names need extra care. A founder named after a famous athlete or author may find that every method returns the famous namesake and nothing for them. That is not a missing ID so much as a crowded one. Add the person type filter in the API (types=Person) and a distinguishing word to your Wikidata search, such as the company name, before you conclude Google has no record.
Two IDs for one entity is the result to act on first. Compare what each record holds, note which one Google surfaces for your name, and work through the merge steps in our guide to duplicate knowledge panels. If an ID you recorded last quarter has stopped resolving, start with why a knowledge panel disappears.
Once you know how to find KGMID codes for your company, run the same three checks on your founder and your top product, because the next wave of AI answers will be built on whichever record Google trusts most when someone asks about you.