Knowledge graph api: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 26: Line 26:
* 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.
* 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>
{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" | Example output of DuckDuckGo Instant Answers API (click to show)
|-
| <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.",
   "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.",
Line 34: Line 37:
(skip)
(skip)
</pre>
</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.
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.

Navigation menu