Instant Answer Search API: Knowledge Panel Lookup avatar

Instant Answer Search API: Knowledge Panel Lookup

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Instant Answer Search API: Knowledge Panel Lookup

Instant Answer Search API: Knowledge Panel Lookup

Instant-answer lookup for any topic. Get a knowledge-panel abstract with source, related topics, disambiguation options and bang redirects as clean JSON. Not a ranked web-search scraper.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Pinto Studio

Pinto Studio

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Categories

Features

Limited permissions

Share

Instant Answer Search API

Looks up an instant answer (a Wikipedia-style abstract, disambiguation options, or a !bang redirect target) for a search query.

Input

{ "q": "Albert Einstein" }

q is required, 1-500 characters.

Output

A single JSON object, pushed both to the default dataset and to the default key-value store under the OUTPUT record, so it works with either the "run synchronously and get dataset items" or the "run synchronously" Apify API endpoint:

{
"error": null,
"message": "OK",
"data": {
"query": "Albert Einstein",
"noInstantAnswer": false,
"hasDirectAnswer": true,
"isDisambiguation": false,
"type": { "code": "A", "label": "Article" },
"heading": "Albert Einstein",
"entity": "scientist",
"abstract": {
"text": "Albert Einstein was a German-born theoretical physicist...",
"source": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/Albert_Einstein"
},
"answer": null,
"definition": null,
"image": { "url": "https://duckduckgo.com/...", "height": 536, "width": 400, "isLogo": false },
"relatedTopics": [],
"results": [],
"redirect": null
}
}

If nothing is found for the query, data.noInstantAnswer is true and the other fields are null/empty - that's the correct response for an unrecognized query, not an error. On a real failure (bad input, or the upstream lookup failing), error carries a short code (MISSING_QUERY, QUERY_TOO_LONG, UPSTREAM_ERROR) and data is null.

Environment variables

Outbound requests fall back through a proxy automatically when the direct connection fails. Set these in the Actor's Console settings (Environment variables), not in this repo:

  • BASE_PROXY - optional HTTP(S) proxy URL, retried after a direct attempt fails.
  • MY_PROXY_METHOD - optional URL of a secondary fetch service, tried last.

Both are optional; with neither set, every request is made directly.