Knowledge Graph Search API
The Google Knowledge Graph Search API is a read-only API that lets you look up entities in the Google Knowledge Graph by name or ID. It returns JSON-LD results using schema.org types, each with a Knowledge Graph ID, name, types, description and a resultScore. Google warns it is not suitable for production-critical services and points new users to Cloud Enterprise Knowledge Graph.
What does the API do?
Google says the API “lets you find entities in the Google Knowledge Graph”, uses standard schema.org types, and is compliant with the JSON-LD specification. Typical uses include getting a ranked list of notable entities matching criteria and annotating content with Knowledge Graph entities.[1] Officially documented
What are the key parameters?
| Parameter | Purpose |
|---|---|
query | Text to search for |
ids | Look up specific Knowledge Graph IDs |
types | Restrict to schema.org types such as Person or Organization |
languages | Language codes for results |
limit | Number of results |
key | Your API key |
https://kgsearch.googleapis.com/v1/entities:search?query=taylor+swift&key=API_KEY&limit=1&indent=True
What does a result contain?
Each item in itemListElement has a result with an @id (such as kg:/m/0dl567), name, @type, description, often a detailedDescription with a source URL and licence, plus a resultScore.[1] Officially documented Google does not document resultScore as a ranking or importance measure for Search; treat it as a relative match score within one response. Practitioner practice
What are its limits?
- “This API is not suitable for use as a production-critical service.”[1]
- Google is migrating it to Cloud Enterprise Knowledge Graph for enterprise and high-QPS needs, and suggests that product for new users.[1]
- It is read-only: you cannot add or edit entities.[1]
- It returns a subset of information, not a full knowledge panel.
How do SEOs use it?
To check whether an entity exists, find its ID and types, see which description Google associates with it, and compare similarly named entities. Step-by-step instructions are in finding entities with the Knowledge Graph Search API.
Running a Knowledge Graph API lookup
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 to Entity disambiguation) |
| 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.
Parameters and response fields in detail
Google’s reference for the entities.search method is a single GET request to https://kgsearch.googleapis.com/v1/entities:search with an empty request body.[3] The query parameters are:
| Parameter | What the reference says |
|---|---|
query | A literal string to search for in the Knowledge Graph. |
ids | A list of entity IDs to look up; repeat the parameter for several, as in ?ids=A&ids=B. |
languages | Language codes (ISO 639) to run the query with, for instance en. |
types | Restricts results to entities of the given schema.org types, for example Person. With several types, an entity needs to match one or more of them. |
prefix | Turns on prefix (initial substring) matching against names and aliases: the reference’s example is that the prefix Jung matches Jung, Jungle and Jung-ho Kang. |
limit | Maximum number of entities returned. The maximum is 500 and the default is 20; requests with high limits are more likely to time out. |
indent | Indents the JSON output. |
The response is JSON-LD that follows schema.org with a few Google extensions such as resultScore.[3] Each result carries these fields: [3]
| Field | Meaning (per the reference) |
|---|---|
@id | The canonical URI for the entity (in the sample, kg:/m/0dl567). |
name | The name of the entity. |
@type | The list of supported schema.org types that match the entity. |
description | A short description of the entity. |
image | An image to help identify the entity; the reference says images are provided so you can confirm you chose the right entity, and that you are responsible for using them lawfully. |
detailedDescription | A detailed description of the entity. |
url | The official website URL of the entity, if available. |
resultScore | “An indicator of how well the entity matched the request constraints.” |
Comparing scores across different queries is not something the reference describes, so treat resultScore as a within-query ranking signal only. This is an inference from the field’s definition. Practitioner practice
Status: read-only, not production-critical, and moving to Enterprise Knowledge Graph
Google’s overview page now carries three notes worth knowing before you build on the API:[1]
- It is a read-only API, and “not suitable for use as a production-critical service”; a product “should not form a critical dependence on this API”.
- It “returns only individual matching entities, rather than graphs of interconnected entities”; for graphs, Google recommends Wikidata data dumps instead.
- Google is “migrating this API to Cloud Enterprise Knowledge Graph”, and says that if you are new to the API you should use the new product instead.
Google Cloud’s Enterprise Knowledge Graph overview describes a Knowledge Graph Search API that uses standard schema.org types and is compliant with the JSON-LD specification. It lists these uses: entity resolution on organizations, products, locations, books and movies; linking a private entity to a globally unique machine ID (MID); getting a ranked list of the most notable entities matching criteria; and annotating content with Knowledge Graph entities.[4] The same page marks Enterprise Knowledge Graph as a Preview product, offered “as is” with possibly limited support.[4]
What this means for entity SEO work (inference): the public lookup is useful for one-off checks of whether Google has an entity and what ID it uses, but a monitoring routine should not depend on it, and any new tooling should be checked against the Cloud product’s current terms. Practitioner practice
Frequently asked questions
Is the Knowledge Graph Search API free?
It requires a Google Cloud API key; check Google Cloud's current quotas and terms before relying on it.
Does a resultScore show ranking strength?
Google does not document it that way. Use it only to compare matches within the same response.
Can I add my business with the API?
No. The API is read-only.
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.
- ^ "Method: entities.search (Knowledge Graph Search API reference)". Google for Developers. Last updated June 26, 2024. Accessed October 29, 2026.
- ^ "Enterprise Knowledge Graph overview". Google Cloud. Last updated October 26, 2026. Accessed October 29, 2026.