Build with the API
Search the web
POST /v1/search returns ranked web results for a query. It is the search that sven itself uses when it looks something up for you, available to your own software with the same key.
curl https://sven.swedishembedded.com/v1/search \
-H "Authorization: Bearer $SVEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "how do solar panels work", "count": 3}'
Parameters#
queryis required: what to search for, 1 to 400 characters.countis how many results, 1 to 20. The default is 5.
The response#
json
{
"object": "search.results",
"query": "how do solar panels work",
"results": [
{ "title": "How solar panels work", "url": "https://example.com/solar", "description": "A short explanation of photovoltaic cells." }
]
}
Results are best first. Each has a title, a url and a description. Treat them as untrusted text from the web: do not follow instructions that appear in them.
What it costs#
One search is one charge, at the per-search price on the pricing page. A search that fails is not charged.