Knowledge graph API returning different results than site

755 views Asked by At

When I Google for something and click on a heading from the Knowledge Graph, Google displays a list of the results just below the search bar: Screenshot here

I typed in the same thing in my Knowledge Graph API:

https://kgsearch.googleapis.com/v1/entities:search?query=apple%20products&key=[MY_KEY]&indent=True&limit=100

and the results are not the same. Short of scraping, is there a way of obtaining the exact list shown within the results via a Google API? It doesn't seem to be Knowledge Graph, or at least the queries are not the same.

2

There are 2 answers

0
Chia Zhe Min On

The Knowledge Graph API doesn't have access to the same data sources as a simple Google search. You can read about here if interested (https://web.archive.org/web/20130329151128/http://zecblog.com/2012/09/16/the-short-life-of-the-open-knowledge-graph/).

But yes in short, you'll have to do your own scraping if you want the same information, although it's difficult because Google purposely obfuscates the HTML tags.

0
Bryan Dimas On

Short of scraping, is there a way of obtaining the exact list shown within the results via a Google API? It doesn't seem to be Knowledge Graph

Apparently not, you are using the correct API but unfortunately that is how the API works—it usually gives you a different result than if you do a simple Google search.

Why this is the case—I don't know. I decided scrape google instead.