curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "X-Payment-Proof: <your_x402_signature>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const results = await agent.webSearch({
query: "best AI agent frameworks 2026",
max_results: 5,
});
for (const result of results.data.results) {
console.log(`${result.title}: ${result.url}`);
}
{
"success": true,
"data": {
"query": "best AI agent frameworks 2026",
"results": [
{
"url": "https://example.com/ai-frameworks",
"title": "Top AI Agent Frameworks in 2026",
"description": "A comprehensive comparison of the leading AI agent frameworks..."
},
{
"url": "https://example.com/langchain-vs-crewai",
"title": "LangChain vs CrewAI: Which Framework to Choose",
"description": "An in-depth comparison of two popular agent frameworks..."
}
],
"result_count": 2
}
}
Research
Web Search
Search the web and get structured results instantly
POST
/
v1
/
tools
/
search
curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "X-Payment-Proof: <your_x402_signature>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const results = await agent.webSearch({
query: "best AI agent frameworks 2026",
max_results: 5,
});
for (const result of results.data.results) {
console.log(`${result.title}: ${result.url}`);
}
{
"success": true,
"data": {
"query": "best AI agent frameworks 2026",
"results": [
{
"url": "https://example.com/ai-frameworks",
"title": "Top AI Agent Frameworks in 2026",
"description": "A comprehensive comparison of the leading AI agent frameworks..."
},
{
"url": "https://example.com/langchain-vs-crewai",
"title": "LangChain vs CrewAI: Which Framework to Choose",
"description": "An in-depth comparison of two popular agent frameworks..."
}
],
"result_count": 2
}
}
Overview
Synchronous web search. Returns results immediately — no polling needed.Authentication
Requires x402 payment proof in theX-Payment-Proof header.
Request Body
string
required
Search query (1-500 characters)
integer
default:5
Maximum number of results to return (1-20)
Response (200)
string
The search query
array
Array of search results, each with
url, title, and descriptioninteger
Number of results returned
curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "X-Payment-Proof: <your_x402_signature>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5
}'
import { OneShot } from "@oneshot-agent/sdk";
const agent = new OneShot({ privateKey: process.env.AGENT_PRIVATE_KEY });
const results = await agent.webSearch({
query: "best AI agent frameworks 2026",
max_results: 5,
});
for (const result of results.data.results) {
console.log(`${result.title}: ${result.url}`);
}
{
"success": true,
"data": {
"query": "best AI agent frameworks 2026",
"results": [
{
"url": "https://example.com/ai-frameworks",
"title": "Top AI Agent Frameworks in 2026",
"description": "A comprehensive comparison of the leading AI agent frameworks..."
},
{
"url": "https://example.com/langchain-vs-crewai",
"title": "LangChain vs CrewAI: Which Framework to Choose",
"description": "An in-depth comparison of two popular agent frameworks..."
}
],
"result_count": 2
}
}
See Pricing for web search costs.
Notes
- Results are returned synchronously (no job polling)
- 15-second timeout per request