curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5,
"published_within": "week"
}'
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,
published_within: "week",
});
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...",
"published_at": "2026-01-14"
},
{
"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...",
"published_at": null
}
],
"result_count": 2
}
}
Web & Browser
Web Search
Search the web and get structured results synchronously
POST
/
v1
/
tools
/
search
curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5,
"published_within": "week"
}'
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,
published_within: "week",
});
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...",
"published_at": "2026-01-14"
},
{
"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...",
"published_at": null
}
],
"result_count": 2
}
}
Overview
Synchronous web search. Results return in the response, with no polling.Authentication
Requires x402 payment in thepayment-signature header.
Request Body
Only results published within the last
day, week, month or year. Omit it for no date window. day and week reach back 1 and 7 days; month and year reach back one calendar month or year to the same day of the month (the last day of a shorter month). The window is the search engine’s time filter; results from the fallback search are checked against it by published_at at day resolution: a result dated on or after the window’s first day is kept, one dated before it is dropped, and one with no known date is kept.Response (200)
Publication date as
YYYY-MM-DD when the page states one, otherwise null. The date is reported as stated, however old or even ahead of today; a date that does not exist on the calendar is null.curl -X POST https://win.oneshotagent.com/v1/tools/search \
-H "Content-Type: application/json" \
-H "payment-signature: <base64 x402 payment>" \
-d '{
"query": "best AI agent frameworks 2026",
"max_results": 5,
"published_within": "week"
}'
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,
published_within: "week",
});
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...",
"published_at": "2026-01-14"
},
{
"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...",
"published_at": null
}
],
"result_count": 2
}
}
See Pricing for web search costs.
Notes
- Results return synchronously (no job polling)
- Each paid call is recorded: it has a job record and a receipt, like Web Read
- 15-second timeout per request