Knowledge graph API to collect PASF result

72 views Asked by At

I am trying to collect PASF results similar to what we get from google search through knowledge graph API

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

and when we click on the PASF result you get this URL :

https://www.google.com/search?sxsrf=ALeKk03r4pKfIe9OJlpU5SGOL6JyeRow6Q:1601617125816&q=Donald+Trump&stick=H4sIAAAAAAAAAONgFuLUz9U3SC4ssTRQQjC1pLKTrfQLUvMLclKBVFFxfp5VcWZKanliZfEiVh6X_LzEnBSFkKLS3IIdrIwAKnFGhkYAAAA&sa=X&ved=2ahUKEwiTsebemJXsAhWaTBUIHeCXAooQzTooATAMegQICxAC&biw=2133&bih=1056

All I need is the name, kgid, image of the result.

Like when I query, Trump , I get Joe Biden, Boris Johnson and top 10 icons and their name, image and kg ID

I thought knowledge graph could help me in this. however, I am unsuccessful in getting the PASF result.

Can anyone help me or guide me to a documentation where I can read and fetch data of the PASF only

1

There are 1 answers

0
Lockal On

You cannot get PASF result via knowledge graph API.

You can get embeddable widgets by Freebase/Knowledge Graph ID with related topics using code provided in Google Trends: https://trends.google.com/trends/explore?q=%2Fm%2F0cqt90

There are other ways too, but they include non-public APIs or direct parsing Google Search results, which may violate Google's ToS and out of scope for StackOverflow.