PPC – Cool tricks to explore Google’s Knowledge Graph results, featuring Donald Trump

PPC - Cool tricks to explore Google’s Knowledge Graph results, featuring Donald Trump

Kashin / Shutterstock.com

By now the majority of searchers on Google are familiar with the Knowledge Graph box, which appears on the right side of the search results page and highlights information about various entities (companies, people, places, things and so on).

In the past, I’ve written about how to both obtain and optimize a Knowledge Graph result. In my attempts to learn more and get a better understanding of Google’s Knowledge Graph, I’ve discovered some cool hacks and tricks. While these tricks do not have any significant practical implications, they can serve as a way to better understand how Google’s Knowledge Graph works, which can be used to optimize your personal or company Knowledge Graph results.

Before getting into the tricks, let’s break down some important items. For the examples below, I used Donald Trump.

Google Knowledge Graph API

The Google Knowledge Graph API is a tool that can be used to get insight into your Knowledge Graph result. It provides details about classification of the entity, score and ranking. It also provides a machine-generated identifier (MID), which is a unique code assigned to each entity.

Google Knowledge Graph API

MID (machine-generated identifier)

Machine-generated identifiers, or MIDs, are unique entity IDs that were originally generated from Freebase. Although Freebase was ultimately shut down and the data was migrated to Wikidata, Google is still using the Freebase identifier codes for entities. This could eventually change to Wikidata Qids, but we have to wait and see what Google will do.

As you can see below, in the Knowlege Graph API results for “donald trump,” the president’s entity MID is /m/0cqt90.

Donald Trump MID Entity

Normal search engine results page (SERP)

Here is what the normal SERP looks like when a search for “Donald Trump” is completed. As you can see, Trump is an entity and has a detailed Knowledge Graph panel appearing alongside his search results.


Donald Trump SERP

Knowledge Graph tricks

Knowledge Graph-only SERP

By inserting the following modifiers into the search URL, we can have just the Knowledge Graph Panel appear on the SERP, with no paid or organic listings.


  • kponly  (a command that tweaks the SERPs to only show the Knowledge Graph panel)
  • kgmid= (a command that allows the SERP to be filtered specifically for the specified entity; simply add the MID number after the equal sign)

Original URL: https://www.google.com/search?q=donald+trump

Modified URL: https://www.google.com/search?q=donald+trump&kponly&kgmid=/m/0cqt90

Donald Trump Knowledge Graph Result

Change the language of content in the Knowledge Graph

Adding the hl string to the URL and specifying a language code will change the language of the Knowledge Graph SERP. Here is an example of the content changed to Spanish.

Original URL: https://www.google.com/search?q=donald+trump

Modified URL: https://www.google.com/search?q=donald+trump&kponly&kgmid=/m/0cqt90&hl=es

Donald Trump Spanish

Change related images in the Knowledge Graph panel

Another trick that can be done is to change the related images within the Knowledge Graph panel to items you specify in your search query. For example, a regular search for “donald trump mexico” does not return a Knowledge Graph result.

Donald Trump Mexico No Knowledge Graph

However, by appending the MID to the search results URL, we can generate a Knowledge Graph result that contains images relevant to the search query.

Original URL: https://www.google.com/search?q=donald+trump+mexico

Modified URL: https://www.google.com/search?q=donald+trump+mexico&kgmid=/m/0cqt90

Donald Trump Mexico with Knowledge Graph

Generate a Knowledge Graph panel for an entity for any search query

This trick is my favorite, as it’s great for a prank or joke. Applying the same tactic from the previous example allows you to have a Knowledge Graph panel for your specified MID appear on the SERP for any search query — even if your Knowledge Graph entity is not related to your search.

Original URL: https://www.google.com/search?q=homer+simpson

Modified URL: https://www.google.com/search?q=homer+simpson&kgmid=/m/0cqt90

Donald Trump Homer Simpson

Note that this trick will override an existing Knowledge Graph panel for an entity. Without the “hacked” URL, a search for “Homer Simpson” generates a Knowledge Graph result for Homer Simpson, as expected.



I hope this helps shed some light on how some parts of Google’s Knowledge Graph work. It can be useful if you’re redirecting users to a Google SERP result for reasons related to business or humor.

Some opinions expressed in this article may be those of a guest author and not necessarily Search Engine Land. Staff authors are listed here.

Leave a Reply

Your email address will not be published. Required fields are marked *