AnswerLine Start free

Google Search

Google Search knowledge graph

The knowledge panel Google shows for an entity: description, website, profiles, key facts and Knowledge Graph ID.

When Google shows a knowledge panel, `knowledgeGraph` returns its title, type, description, official website, profiles and attributes, keyed by `kgmid`, for brand SERP audits and entity monitoring.

Returned in result

Field
knowledgeGraph

Request

curl -X POST "https://api.answerline.dev/v1/monitor/google" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"project management software","country":"US","include":{"aioverview":{"markdown":true}}}'

What the knowledge graph panel is

A knowledge panel is the box Google shows beside or above results when a query clearly refers to one entity: a company, person, place, product, film or organization. It summarizes who or what the entity is, where the description comes from, official links and social profiles, key facts, and entity-specific blocks such as ratings or tickets.

result.knowledgeGraph returns that panel as structured fields. The panel is often the first thing a searcher reads about a brand, so it gets audited: whether a panel exists, whether the description, official website and linked profiles are right, and whether they change after a rebrand, acquisition or leadership change. kgmid shows which entity Google picks for an ambiguous name, and the entity-specific blocks carry ratings, contact links, streaming options or admission prices for businesses, titles and venues.

Field reference

Core fields of result.knowledgeGraph

Field Type Meaning
title string Entity name in the panel header.
type string Category label as displayed, such as “French museum”. Free-form, not an enum.
kgmid string The entity’s ID in the Google Knowledge Graph.
description string Short description, possibly sourced from Wikipedia or Google’s knowledge base.
imageUrl string Entity image URL as served by Google.
website string Official website URL.
source object Attribution for the description: name (string), link (string), redirectLink (string, optional).
attributes[] array Key facts as key and value strings, as displayed.
profiles[] array Social and external profiles: name, link, optional redirectLink.
peopleAlsoSearchFor[] array Related entities: name, link (a Google search URL), optional redirectLink.
thingsToKnow[] array Topic clusters: label and subtitle strings.
socialPosts[] array Recent posts from official accounts: platform, text, link, date (as displayed), optional redirectLink.
has3dModel boolean true when Google offers a 3D model viewer for the entity.
redirectLink string Google’s /goto redirect for the panel link, present only when Google served one.

Entity-specific fields

Field Type Present for Contents
menu string Restaurants, food businesses Menu URL.
trailer string Films, TV shows Trailer URL.
ratings[] array Films, TV shows platform, rating (as displayed), link, optional redirectLink.
streamingOptions[] array Films, TV shows platform, link, optional redirectLink.
webRatings[] array Local businesses platform, rating, link, votes (omitted when unavailable), optional redirectLink.
rating object Local businesses Aggregate rating and count, both strings.
contact[] array Local businesses Contact and ordering links: label, url, optional redirectLink.
statsCard object Sports teams, organizations context (such as a season) and stats[] of label/value strings.
notableAlumni[] array Universities name, link (Google search URL), optional redirectLink.
weather object Cities, regions temperature and condition strings.
admission[] array Museums, parks, ticketed venues provider, price, link, badge (optional), optional redirectLink.
artworks[] array Artists, art institutions title, link, author (optional), optional redirectLink.
hotelOptions[] array Hotels provider, price, link, note (optional), optional redirectLink.
trendingProducts[] array Retail brands title, price, link, optional redirectLink.
merchantVideos[] array Retail businesses title, link, platform and duration (optional), optional redirectLink.
listenOn[] array Musicians platform, link, optional redirectLink.

Prices, ratings and counts in these blocks are display strings, not numbers.

Annotated excerpt

Values are illustrative; names and types follow the POST /v1/monitor/google result schema.

{
  "result": {
    // Omitted when the results page has no knowledge panel.
    "knowledgeGraph": {
      "title": "Example Robotics",
      "type": "Robotics company",               // free-form label
      "kgmid": "/g/11example00",                // stable entity key
      "description": "Example Robotics is a manufacturer of warehouse robots...",
      "source": { "name": "Wikipedia", "link": "https://en.wikipedia.org/wiki/Example_Robotics" },
      "website": "https://www.example-robotics.com/",
      "attributes": [
        { "key": "Founded", "value": "2014" },
        { "key": "Headquarters", "value": "Pittsburgh, PA" }
      ],
      "profiles": [
        { "name": "LinkedIn", "link": "https://www.linkedin.com/company/example-robotics" },
        { "name": "YouTube", "link": "https://www.youtube.com/@examplerobotics" }
      ],
      "peopleAlsoSearchFor": [
        { "name": "Sample Automation", "link": "https://www.google.com/search?q=Sample+Automation" }
      ]
      // Entity-specific blocks (webRatings, statsCard, listenOn, ...) appear only when relevant.
    }
  }
}

Cost

No include flag is needed. The panel comes with every Google Search request at the base price: 18.9 credits for a one-page async task, +25.9 for a synchronous call. The panel comes from the first results page, so keep pages at 1.

Example: brand panel audit

The script checks a list of brand queries against what each brand expects: the official website domain and required profiles. It reports panel presence, the kgmid to pin, mismatches, and a fingerprint of the description and attributes so you can detect changes between runs.

import hashlib
import json
import os
import time
from datetime import date
from urllib.parse import urlparse

import requests

API = "https://api.answerline.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}
DAY = date.today().isoformat()
EXPECTED = {
    "example robotics": {"domain": "example-robotics.com", "profiles": {"LinkedIn", "YouTube", "X"}},
    "sample automation": {"domain": "sampleautomation.example", "profiles": {"LinkedIn"}},
}


def run_tasks(tasks):
    resp = requests.post(f"{API}/v1/async/task/batch", headers=HEADERS, json=tasks, timeout=60)
    resp.raise_for_status()
    pending = {item["task"]["id"]: tasks[item["index"]] for item in resp.json()["results"] if item["success"]}
    done = []
    while pending:
        time.sleep(10)
        for task_id in list(pending):
            body = requests.get(f"{API}/v1/async/task/{task_id}", headers=HEADERS, timeout=30).json()
            if body["task"]["status"] in ("COMPLETED", "FAILED"):
                task = pending.pop(task_id)
                if body["task"]["status"] == "COMPLETED":
                    done.append((task["payload"]["query"], body["response"]["result"]))
    return done


def host(url):
    return (urlparse(url or "").hostname or "").removeprefix("www.")


tasks = [
    {"taskType": "GOOGLE", "payload": {"query": q, "country": "US"}, "idempotencyKey": f"kg-{i}-{DAY}"}
    for i, q in enumerate(EXPECTED)
]

for query, result in run_tasks(tasks):
    panel = result.get("knowledgeGraph")
    expected = EXPECTED[query]
    if not panel:
        print(f"{query}: NO PANEL")
        continue
    issues = []
    if host(panel.get("website")) != expected["domain"]:
        issues.append(f"website is {panel.get('website')!r}")
    linked = {p.get("name") for p in panel.get("profiles", [])}
    missing = expected["profiles"] - linked
    if missing:
        issues.append(f"missing profiles {sorted(missing)}")
    facts = {"description": panel.get("description"), "attributes": panel.get("attributes", [])}
    fingerprint = hashlib.sha256(json.dumps(facts, sort_keys=True).encode()).hexdigest()[:12]
    source = (panel.get("source") or {}).get("name", "none")
    print(f"{query}: kgmid={panel.get('kgmid')} type={panel.get('type')!r} source={source} facts={fingerprint}")
    for issue in issues:
        print(f"    - {issue}")

Store the fingerprint per query and day. When it changes, diff the stored description and attributes to see what Google changed, and check whether kgmid changed too: a new ID means Google now resolves the query to a different entity.

Pitfalls

knowledgeGraph is omitted, not null, when there is no panel. Use result.get("knowledgeGraph") and record “no panel” as an observation.

profiles[].name is display text, so match on a set of names you have seen, or on the host of link, rather than exact spellings.

attributes[].key values follow the result language, which follows the country. Keep country fixed per series, or change detection will flag translations as changes.

Titles can change or collide between entities with the same name. Track by kgmid.

Most entity-specific fields appear only for some entity types. Code every one of them as optional.

Questions

When does Google Search return knowledgeGraph?

Only when the results page shows a knowledge panel for the query. Otherwise the field is omitted from result rather than set to null, so treat it as optional.

Does the knowledge graph cost extra credits?

No. knowledgeGraph comes with every Google Search request at the base price: 18.9 credits for a one-page async task and 44.8 for a synchronous call.

What is kgmid?

kgmid is the The entity's ID in the Google Knowledge Graph in the panel. It is the most stable key for tracking the same entity across queries and over time.

Are knowledge panel attributes normalized?

No. attributes is a list of key and value strings as Google displays them, such as a founding date or headquarters label. Keys depend on the entity and the result language.

Which knowledge graph fields appear for which entities?

It depends on the entity. For example: menu for restaurants, trailer, ratings and streamingOptions for films and TV, webRatings, rating and contact for local businesses, statsCard for sports teams and listenOn for musicians.

More Google Search data

All Google Search fields · API reference