Exa
Exa web search, page contents, similar pages and cited answers for Sanoma workflows.
Package @sanoma-ai/connector-exa, version 0.11.24. Its README, with how to install and connect it, is on GitHub.
web
search
Search the web, and return the pages found, with their text, highlights or summary if asked.
Input
- querystringrequired
at least 1 character
- type"auto" | "neural" | "lite"
How Exa searches:
autoby default,litethe cheapest (beta) - category"company" | "publication" | "news" | "personal site" | "financial report" | "people"
The kind of page to look for
- numResultsinteger
How many results, 10 by default
at least 1, at most 100
- includeDomainsstring[]
Only results from these domains
each item: at least 1 character
- excludeDomainsstring[]
No results from these domains
each item: at least 1 character
- startPublishedDatestring
Only pages published after this date
at least 1 character
- endPublishedDatestring
Only pages published before this date
at least 1 character
- contentsobject
What of each page to return with it
Fields
- texttrue | object
The page's text, all of it or up to
maxCharactersFields
- maxCharactersinteger
more than 0
- maxCharactersinteger
- highlightstrue | object
The passages of the page most relevant to the query, or to
queryFields
- maxCharactersinteger
more than 0
- querystring
at least 1 character
- maxCharactersinteger
- summaryobject
A summary of the page, written for
querywhen givenFields
- querystring
at least 1 character
- querystring
- maxAgeHoursinteger
The oldest cached copy to use, in hours, else Exa fetches the page again: 0 always, -1 never
at least -1
- texttrue | object
Output
- resultsobject[]required
Each item
- idstringrequired
- urlstringrequired
- titlestring | null
- authorstring | null
- publishedDatestring | null
- scorenumber | null
- imagestring | null
- faviconstring | null
- textstring
- highlightsstring[]
- summarystring
getContents
Read pages by URL: their text, highlights or summary.
Input
- urlsstring[]required
at least 1 item, each item: format uri
- texttrue | object
The page's text, all of it or up to
maxCharactersFields
- maxCharactersinteger
more than 0
- maxCharactersinteger
- highlightstrue | object
The passages of the page most relevant to the query, or to
queryFields
- maxCharactersinteger
more than 0
- querystring
at least 1 character
- maxCharactersinteger
- summaryobject
A summary of the page, written for
querywhen givenFields
- querystring
at least 1 character
- querystring
- maxAgeHoursinteger
The oldest cached copy to use, in hours, else Exa fetches the page again: 0 always, -1 never
at least -1
Output
- resultsobject[]required
Each item
- idstringrequired
- urlstringrequired
- titlestring | null
- authorstring | null
- publishedDatestring | null
- scorenumber | null
- imagestring | null
- faviconstring | null
- textstring
- highlightsstring[]
- summarystring
- statusesobject[]required
Each item
- idstringrequired
- statusstringrequired
- errorobject | null
Fields
- tagstring
- httpStatusCodenumber | null
findSimilar
Find pages like the one at a URL.
Input
- urlstringrequired
format uri
- excludeSourceDomainboolean
No results from the URL's own domain
- numResultsinteger
How many results, 10 by default
at least 1, at most 100
- includeDomainsstring[]
Only results from these domains
each item: at least 1 character
- excludeDomainsstring[]
No results from these domains
each item: at least 1 character
- startPublishedDatestring
Only pages published after this date
at least 1 character
- endPublishedDatestring
Only pages published before this date
at least 1 character
- contentsobject
What of each page to return with it
Fields
- texttrue | object
The page's text, all of it or up to
maxCharactersFields
- maxCharactersinteger
more than 0
- maxCharactersinteger
- highlightstrue | object
The passages of the page most relevant to the query, or to
queryFields
- maxCharactersinteger
more than 0
- querystring
at least 1 character
- maxCharactersinteger
- summaryobject
A summary of the page, written for
querywhen givenFields
- querystring
at least 1 character
- querystring
- maxAgeHoursinteger
The oldest cached copy to use, in hours, else Exa fetches the page again: 0 always, -1 never
at least -1
- texttrue | object
Output
- resultsobject[]required
Each item
- idstringrequired
- urlstringrequired
- titlestring | null
- authorstring | null
- publishedDatestring | null
- scorenumber | null
- imagestring | null
- faviconstring | null
- textstring
- highlightsstring[]
- summarystring
answer
Answer a question from a web search, with the pages the answer cites.
Input
- querystringrequired
at least 1 character
- textboolean
Return each cited page's text too
Output
- answerstringrequired
- citationsobject[]required
Each item
- idstringrequired
- urlstringrequired
- titlestring | null
- authorstring | null
- publishedDatestring | null
- scorenumber | null
- imagestring | null
- faviconstring | null
- textstring
- highlightsstring[]
- summarystring
These pages describe sanoma 0.11.24.