Search

Search the web, Wikipedia and dictionaries from your code. Our own index, answers in milliseconds, ready for your app or your model.

Get your key
Learn more
Web search

The web in one call From our own index

Send a query and get ranked pages, each with its title, description, language and date. A confidence score tells you how sure the answer is.

Request
curl -X POST "https://api.surfy.one/search" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{ "query": "how do solar panels work", "limit": 2
}'
Answer, shortened
{ "query": "how do solar panels work", "time_ms": 16.06, "web": { "results": [ { "url": "https://mentalfloss.com/technology/how-do-solar-panels-work", "title": "How Do Solar Panels Work?", "desc": "They’re an increasingly common sight on the tops of buildings and residential properties…", "host": "mentalfloss.com", "lang": "en", "date": "2017-08-04" }, { "url": "https://livescience.com/41995-how-do-solar-panels-work.html", "title": "How Do Solar Panels Work?", "desc": "Solar panels crown rooftops and roadside signs, and help keep spacecraft powered…", "host": "livescience.com", "lang": "en", "date": "2022-02-11" } ], "confidence": 0.824 }, "cached": false
}
Sources

Wikipedia and dictionaries In the same call

Name the sources in src and each one answers on its own, with its own confidence. One request covers the web, the encyclopedia and the meaning of a word.

Request
curl -X POST "https://api.surfy.one/search" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{ "query": "photosynthesis", "src": [ "web", "wiki", "dict" ], "limit": 1
}'
Answer, shortened
{ "query": "photosynthesis", "time_ms": 13.66, "web": { "results": [ { "url": "https://sciencedaily.com/terms/photosynthesis.htm", "title": "Photosynthesis", "desc": "Photosynthesis is the process by which green plants, algae, and some bacteria convert sunlight into chemical energy." } ], "confidence": 0.865 }, "wiki": { "results": [ { "url": "https://en.wikipedia.org/wiki/Photosynthesis", "title": "Photosynthesis", "desc": "Photosynthesis is a system of biological processes by which photopigment-bearing autotrophic organisms…" } ], "confidence": 1.0 }, "dict": { "results": [ { "url": "https://en.wiktionary.org/wiki/photosynthesis#English", "title": "photosynthesis", "desc": "Noun: 1. (biochemistry, organic chemistry) Any process by which plants and other photoautotrophs convert light energy into chemical energy." } ], "confidence": 1.0 }, "cached": false
}
Passages

Context for your model With a source on every piece

Set a budget in words and get the passages that answer the question, gathered from the best pages. Each one carries its page’s address and title, so your answers can cite.

Request
curl -X POST "https://api.surfy.one/search" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{ "query": "why is the sky blue", "budget": 120, "limit": 1
}'
Answer, shortened
{ "query": "why is the sky blue", "time_ms": 28.36, "web": { "results": [ { "url": "https://worldatlas.com/articles/why-is-the-sky-blue.html", "title": "Why is the Sky Blue?" } ], "passages": [ { "url": "https://worldatlas.com/articles/why-is-the-sky-blue.html", "title": "Why is the Sky Blue?", "text": "Why is the Sky Blue? The sky in a shade of deep blue. Nature presents some mysteries on how certain things are the way they are…" } ], "confidence": 0.847 }, "cached": false
}
Your sites

Search the sites you trust Up to 100 in a call

Name the hosts in a call and every answer comes from them. Your account can also keep a list of sites that every call stays within.

Request
curl -X POST "https://api.surfy.one/search" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{ "query": "vaccines", "hosts": [ "who.int" ], "limit": 1
}'
Answer, shortened
{ "query": "vaccines", "time_ms": 2.41, "web": { "results": [ { "url": "https://who.int/news-room/questions-and-answers/item/vaccines-and-immunization-what-is-vaccination", "title": "Vaccines and immunization: What is vaccination?", "host": "who.int", "marks": [ "official" ] } ], "confidence": 0.42 }, "cached": false
}
Try it live

Search on Surfy Built on the same index

Surfy, our search engine, finds its sources in the same index you call. Ask it anything and see what it finds.

Good to know

Send a POST with a JSON body to https://api.surfy.one/search, with your key in the x-api-key header. Only query is needed. The answer comes back as JSON.

query, up to 500 characters. lang, a language code such as "en". limit, up to 50 results from each source, 10 by default. src, any of web, wiki and dict, web by default. hosts, up to 100 sites. snippet, up to 2,000 characters of text a result. budget, up to 4,000 words of passages.

Every account starts with 1,000 free search calls. After that, see Pricing. A search that can’t be answered uses no call.

Every answer says how long the search took in time_ms, timed on our servers. Delivery adds the time it takes to reach you.

Up to 60 a minute with each key. A call past that is refused with a 429, and uses no call.

The answer carries a msg that says why. A field that can’t be read gets a 400, a key with no calls left gets a 402, and a search that can’t answer within 5 seconds gets a 503.

Sign in with your email. Your key is waiting on your account page.

Start building

Get your free API key. One endpoint for every API, and libraries to call it from your code.

No card needed