The main response from the Instant Answer API
Instance methods
abstract
Topic summary (may contain HTML)
Sourceabstract_source
Source of the abstract (e.g., "Wikipedia")
Sourceabstract_text
Topic summary (plain text)
Sourceabstract_url
URL to the abstract source
Sourceanswer
Instant answer text (can be string or object in API, normalized to string)
Sourceanswer_type_raw
Type of instant answer (raw string)
Sourcearticle?
Check if this is an article
Sourcecategory?
Check if this is a category
Sourcedisambiguation?
Check if this is a disambiguation page
Sourceentity
Additional fields that appear in some responses
Sourcehas_results?
Check if there are any results
Sourceimage
Image URL associated with abstract
Sourceinstant_answer?
Check if this has an instant answer
Sourceredirect
Redirect URL for !bang commands
Sourceredirect?
Check if this is a !bang redirect
Sourcetopic_groups
Get topic groups (for disambiguation pages)
Sourcetype_raw
Response type (raw string)
Sourcezci
Get the best single text answer (zero-click info)
Returns the most relevant text based on response type priority:
- Abstract text (articles)
- Answer (instant answers)
- Definition
- First related topic text
- Redirect URL (!bangs)
Source