How to Install WordPress: A Beginner’s Guide

The Knowledge Graph Search API lets you find entities in the Google Knowledge Graph. The API uses standard types and is compliant with the JSON-LD specification.

Typical use cases #

Some examples of how you can use the Knowledge Graph Search API include:

  • Getting a ranked list of the most notable entities that match certain criteria.
  • Predictively completing entities in a search box.
  • Annotating/organizing content using the Knowledge Graph entities.

Note: The Knowledge Graph Search API is a read-only API.Warning: This API is not suitable for use as a production-critical service. Your product should not form a critical dependence on this API.

For detailed information about the API methods and parameters, see the API Reference.

Sample request #

The following example shows one kind of request you can send to the API. (But check the Prerequisites section first. You’ll also need to insert your own API key.)

  "@context": {
    "@vocab": "",
    "goog": "",
    "resultScore": "goog:resultScore",
    "detailedDescription": "goog:detailedDescription",
    "EntitySearchResult": "goog:EntitySearchResult",
    "kg": ""
  "@type": "ItemList",
  "itemListElement": [
      "@type": "EntitySearchResult",
      "result": {
        "@id": "kg:/m/0dl567",
        "name": "Taylor Swift",
        "@type": [
        "description": "Singer-songwriter",
        "image": {
          "contentUrl": "",
          "url": "",
          "license": ""
        "detailedDescription": {
          "articleBody": "Taylor Alison Swift is an American singer-songwriter and actress. Raised in Wyomissing, Pennsylvania, she moved to Nashville, Tennessee, at the age of 14 to pursue a career in country music. ",
          "url": "",
          "license": ""
        "url": ""
      "resultScore": 4850

The sample search above returns a JSON-LD result similar to the following:

Note: The Knowledge Graph Search API returns only individual matching entities, rather than graphs of interconnected entities. If you need the latter, we recommend using data dumps from Wikidata instead.

The following code samples show how to perform a similar search in various supported languages. This search returns entries matching Taylor Swift.PythonJavaJavascriptPHP

Knowledge Graph entities #

The Knowledge Graph has millions of entries that describe real-world entities like people, places, and things. These entities form the nodes of the graph.

The following are some of the types of entities found in the Knowledge Graph:

Was this page helpful?

Powered by BetterDocs

We will be happy to hear your thoughts

      Leave a reply