How to find entities with the Knowledge Graph Search API
To find an entity in Google’s Knowledge Graph, create an API key in Google Cloud, enable the Knowledge Graph Search API, and call the entities:search endpoint with your query (optionally filtered by type). Each result gives a Knowledge Graph ID such as kg:/m/0dl567, the entity’s schema.org types, a short description and a resultScore you can use to compare matches.
What do you need?
- A Google Cloud project with the Knowledge Graph Search API enabled and an API key.[1]
- A browser,
curlor a short script.
How do you run a lookup?
- Search by name:
https://kgsearch.googleapis.com/v1/entities:search?query=local+blitz&limit=10&indent=True&key=API_KEY
- Filter by type to cut noise: add
&types=Organizationor&types=Person. - Look up a known ID: use
&ids=/m/0dl567instead ofquery. - Read each result:
@id,name,@type,description,detailedDescription.urlandresultScore.[1] Officially documented
How do you interpret the results?
| What you see | What it suggests |
|---|---|
| Your entity with the right type and description | Google recognises it; check facts in the panel |
| Your entity with a wrong or generic description | Weak or conflicting sources; strengthen your entity home |
| Only a same-named entity | Disambiguation work needed (guide) |
| No result | Not in the public API; may still exist internally, or not yet recognised |
These interpretations are practitioner rules of thumb. Practitioner practice The API returns a subset of data and Google warns it is not for production-critical use.[1]
How do you use a Knowledge Graph ID?
- Record it in your entity map to track the entity over time.
- Cross-check it in Wikidata: property P2671 stores Google Knowledge Graph IDs and P646 stores Freebase IDs.[2]
- Many SEOs open
https://www.google.com/search?kgmid=/m/0dl567to view the panel for an ID; this URL parameter is not documented by Google. Practitioner practice
Is there a no-code option?
You can paste the request URL into a browser. Several SEO tools wrap the same API; see entity SEO tools.
Frequently asked questions
What is a kg:/m/ or kg:/g/ ID?
It is a Knowledge Graph machine ID. IDs starting /m/ follow the format Freebase used; /g/ IDs are also common. Both identify an entity in Google's graph.
Why does my brand not appear?
The public API returns a subset of entities. A missing result can mean Google has not recognised the entity yet or that the API simply does not return it.
See also
References
Pages accessed September 29, 2026 unless a date is given. See all sources and our editorial policy.
- ^ "Google Knowledge Graph Search API". Google for Developers.
- ^ "Wikidata: Identifiers". Wikidata.