Search the web and get structured results — titles, URLs, and snippets. Built for agents that need to research, fact-check, or find information without API key signups.
Base URL:
https://pylon-search-api.fly.dev
The search endpoint accepts GET requests with the query as a parameter.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query |
count | number | No | Number of results to return (default: 10) |
category | string | No | Search category: general, news, images, science (default: general) |
Returns JSON with search results on success (200 OK).
{
"query": "x402 payment protocol",
"results": [
{
"title": "x402 Protocol Specification",
"url": "https://x402.org/docs",
"snippet": "The x402 protocol enables machine-to-machine payments...",
"source": "google"
}
],
"count": 10,
"category": "general"
}
| Status | Description |
|---|---|
200 | Search results returned as JSON |
402 | Payment required — x402 challenge returned |
400 | Missing or invalid q parameter |
502 | Search backend unavailable |
$0.003 USDC per search — paid via x402 on Base (Coinbase L2). No minimum. No subscription.
# Search the web
curl "https://pylon-search-api.fly.dev/search?q=x402+protocol&count=5"
# First request returns 402 with payment details
# x402 client handles payment automatically
import { createClient } from "x402-client";
const client = createClient({
network: "base",
privateKey: process.env.PRIVATE_KEY,
});
const response = await client.get(
"https://pylon-search-api.fly.dev/search",
{ params: { q: "x402 protocol", count: 5 } }
);
console.log(response.data.results);
from x402_client import Client
client = Client(
network="base",
private_key=os.environ["PRIVATE_KEY"],
)
response = client.get(
"https://pylon-search-api.fly.dev/search",
params={"q": "x402 protocol", "count": 5},
)
for result in response.json()["results"]:
print(result["title"], result["url"])
# Use via the Pylon Agent Gateway
curl -X POST "https://api.pylonapi.com/do" \
-H "Content-Type: application/json" \
-d '{
"task": "search for x402 payment protocol documentation"
}'
# The gateway routes to the search API automatically
To use Pylon APIs, you need an x402-compatible client with a funded wallet on Base. Here's the quick setup: