Migrate from legacy Google Knowledge Graph Search API

Updates to the request

  1. New Google Knowledge Graph Search API introduces two editions, Basic and Advanced. For more information, see Basic and Advanced editions.

  2. To support security and compliance requirements, move to a new prediction endpoint. If planning to use the Basic edition, use a new access token or a service account for this API and replace your endpoint URL as shown here:

Legacy

https://kgsearch.googleapis.com/v1/entities

Updated

https://enterpriseknowledgegraph.googleapis.com/v1/projects/PROJECT_ID/locations/global/publicKnowledgeGraphEntities

Updates to the response

  1. Cloud Knowledge Graph MID becomes the primary MID (identifier) for the entity. You can still find the Google Knowledge Graph MID in the identifier section for backward compatibility. For more information, see Understand Machine ID (MID).

    "identifier": [
      {
        "@type": "PropertyValue",
        "propertyID": "googleKgMID",
        "value": "/m/06pwq"
      }
    ]
    
  2. The additionalProperty has been added to describe the license requirement for the name field.

    "additionalProperty": {
      "@type": "PropertyValue",
      "name": "nameLicense",
      "value": "https://cloud.google.com/maps-platform/terms"
    }
    
  3. The resultScore field has been removed from the response.