Knowledge graph api: Difference between revisions
Jump to navigation
Jump to search
(Created page with "List of Knowledge graph API * ''$'' [https://developers.google.com/knowledge-graph Google Knowledge Graph Search API | Google Developers] * ''$'' [https://products.wolfra...") |
No edit summary |
||
| Line 1: | Line 1: | ||
List of Knowledge graph API | List of Knowledge graph API | ||
== List of Knowledge graph API == | |||
* ''$'' [https://developers.google.com/knowledge-graph Google Knowledge Graph Search API | Google Developers] | * ''$'' [https://developers.google.com/knowledge-graph Google Knowledge Graph Search API | Google Developers] | ||
* ''$'' [https://products.wolframalpha.com/api/ Wolfram|Alpha APIs: Computational Knowledge Integration] | * ''$'' [https://products.wolframalpha.com/api/ Wolfram|Alpha APIs: Computational Knowledge Integration] | ||
* ''$'' [https://aws.amazon.com/tw/neptune/knowledge-graphs-on-aws/ Knowledge Graphs - Amazon Neptune - Amazon Web Services] | * ''$'' [https://aws.amazon.com/tw/neptune/knowledge-graphs-on-aws/ Knowledge Graphs - Amazon Neptune - Amazon Web Services] | ||
* [https://www.wikidata.org/wiki/Wikidata:Data_access Wikidata:Data access - Wikidata] | * [https://www.wikidata.org/wiki/Wikidata:Data_access Wikidata:Data access - Wikidata] | ||
* [https://duckduckgo.com/api DuckDuckGo Instant Answers API]: The original API documentation has been taken offline (Discussion on Reddit<ref>[https://www.reddit.com/r/duckduckgo/comments/xpea65/duckduckgocomapi_redirects_back_to_the_main_page/ DuckDuckGo.com/api redirects back to the main page. Please don't tell me this is the end of the Instant Answers API! : r/duckduckgo] (2022-09-27)</ref>), but the API endpoint can still be used<ref>[https://medium.com/@prateek.vyas/10-must-know-python-code-snippets-for-leveraging-llms-b152fb450ff5 Understand DuckDuckGo Search API: A Practical Guide with step-by-step Python Code Examples | by Prateek Vyas • M.Tech. | Medium]</ref>. | |||
[[Category:Tool]] | === Understanding the DuckDuckGo Instant Answers API === | ||
'''API Endpoint Structure''' | |||
{{kbd | key=<nowiki>https://api.duckduckgo.com/?format=<FORMAT>&q=<QUERY></nowiki>}} | |||
Where: | |||
* <FORMAT> specifies the response format (e.g., json) | |||
* <QUERY> is your URL-encoded search term (e.g., Keira Christina Knightley) | |||
Example: | |||
https://api.duckduckgo.com/?format=json&q=who%20is%20girl%20friend%20of%20Simba | |||
'''Demonstration search term:''' "Keira Christina Knightley" | |||
* Web Search Experience: When visiting the [https://duckduckgo.com/?q=Keira+Christina+Knightley&t=h_&ia=web DuckDuckGo search page], users see an information card with text like: "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas..." | |||
* API Integration: This same biographical information can be programmatically accessed via the [https://api.duckduckgo.com/?q=Keira%20Christina%20Knightley&format=json&pretty=1 Instant Answers API] in the "AbstractText" or "Abstract" field of the JSON response. | |||
<pre> | |||
{ | |||
"Abstract" : "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas, she has received numerous accolades, including nominations for two Academy Awards, two British Academy Film Awards, four Golden Globes, and a Laurence Olivier Award. In 2018, she was appointed an OBE at Buckingham Palace for services to drama and charity. Born in London to actors Will Knightley and Sharman Macdonald, Knightley obtained an agent at age six and initially worked in commercials and television films. Following a minor role as Sab\u00e9 in Star Wars: Episode I \u2013 The Phantom Menace, her breakthrough came when she played a tomboy footballer in Bend It Like Beckham and co-starred in Love Actually. She achieved global recognition for playing Elizabeth Swann in the Pirates of the Caribbean film series. For her portrayal of Elizabeth Bennet in Pride & Prejudice, Knightley was nominated for the Academy Award for Best Actress.", | |||
"AbstractSource" : "Wikipedia", | |||
"AbstractText" : "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas, she has received numerous accolades, including nominations for two Academy Awards, two British Academy Film Awards, four Golden Globes, and a Laurence Olivier Award. In 2018, she was appointed an OBE at Buckingham Palace for services to drama and charity. Born in London to actors Will Knightley and Sharman Macdonald, Knightley obtained an agent at age six and initially worked in commercials and television films. Following a minor role as Sab\u00e9 in Star Wars: Episode I \u2013 The Phantom Menace, her breakthrough came when she played a tomboy footballer in Bend It Like Beckham and co-starred in Love Actually. She achieved global recognition for playing Elizabeth Swann in the Pirates of the Caribbean film series. For her portrayal of Elizabeth Bennet in Pride & Prejudice, Knightley was nominated for the Academy Award for Best Actress.", | |||
"AbstractURL" : "https://en.wikipedia.org/wiki/Keira_Knightley", | |||
(skip) | |||
</pre> | |||
Known Limitation {{exclaim}}: There's currently a discrepancy between web search results and API responses for certain queries. For instance, searching for "height of eiffel tower" produces different results depending on whether you use the web interface or the API endpoint. | |||
== References == | |||
<references /> | |||
[[Category: Tool]] | |||
Revision as of 00:33, 11 April 2025
List of Knowledge graph API
List of Knowledge graph API
- $ Google Knowledge Graph Search API | Google Developers
- $ Wolfram|Alpha APIs: Computational Knowledge Integration
- $ Knowledge Graphs - Amazon Neptune - Amazon Web Services
- Wikidata:Data access - Wikidata
- DuckDuckGo Instant Answers API: The original API documentation has been taken offline (Discussion on Reddit[1]), but the API endpoint can still be used[2].
Understanding the DuckDuckGo Instant Answers API
API Endpoint Structure https://api.duckduckgo.com/?format=<FORMAT>&q=<QUERY>
Where:
- <FORMAT> specifies the response format (e.g., json)
- <QUERY> is your URL-encoded search term (e.g., Keira Christina Knightley)
Example: https://api.duckduckgo.com/?format=json&q=who%20is%20girl%20friend%20of%20Simba
Demonstration search term: "Keira Christina Knightley"
- Web Search Experience: When visiting the DuckDuckGo search page, users see an information card with text like: "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas..."
- API Integration: This same biographical information can be programmatically accessed via the Instant Answers API in the "AbstractText" or "Abstract" field of the JSON response.
{
"Abstract" : "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas, she has received numerous accolades, including nominations for two Academy Awards, two British Academy Film Awards, four Golden Globes, and a Laurence Olivier Award. In 2018, she was appointed an OBE at Buckingham Palace for services to drama and charity. Born in London to actors Will Knightley and Sharman Macdonald, Knightley obtained an agent at age six and initially worked in commercials and television films. Following a minor role as Sab\u00e9 in Star Wars: Episode I \u2013 The Phantom Menace, her breakthrough came when she played a tomboy footballer in Bend It Like Beckham and co-starred in Love Actually. She achieved global recognition for playing Elizabeth Swann in the Pirates of the Caribbean film series. For her portrayal of Elizabeth Bennet in Pride & Prejudice, Knightley was nominated for the Academy Award for Best Actress.",
"AbstractSource" : "Wikipedia",
"AbstractText" : "Keira Christina Knightley OBE is an English actress. Known for her work in independent films and blockbusters, particularly period dramas, she has received numerous accolades, including nominations for two Academy Awards, two British Academy Film Awards, four Golden Globes, and a Laurence Olivier Award. In 2018, she was appointed an OBE at Buckingham Palace for services to drama and charity. Born in London to actors Will Knightley and Sharman Macdonald, Knightley obtained an agent at age six and initially worked in commercials and television films. Following a minor role as Sab\u00e9 in Star Wars: Episode I \u2013 The Phantom Menace, her breakthrough came when she played a tomboy footballer in Bend It Like Beckham and co-starred in Love Actually. She achieved global recognition for playing Elizabeth Swann in the Pirates of the Caribbean film series. For her portrayal of Elizabeth Bennet in Pride & Prejudice, Knightley was nominated for the Academy Award for Best Actress.",
"AbstractURL" : "https://en.wikipedia.org/wiki/Keira_Knightley",
(skip)
Known Limitation
: There's currently a discrepancy between web search results and API responses for certain queries. For instance, searching for "height of eiffel tower" produces different results depending on whether you use the web interface or the API endpoint.