Web Search

Perceptron Web Search gives your AI Agents the ability to query the live web for current information. Research topics, find facts, fetch real-time data, and stay informed about the world. One API call, instant results.

Web Search is a first-class API billed per request. No subscription required, you only pay for what you use.

API Reference

Method Path Description
POST /api/web_search Query the web

API Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Search the Web

POST /api/web_search

curl -X POST https://perceptron.cloud/api/web_search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "latest ethereum gas prices", "count": 5}'
{
  "query": "latest ethereum gas prices",
  "results": [
    {
      "title": "Ethereum Gas Tracker",
      "url": "https://example.com/gas",
      "snippet": "Current gas price: 12 gwei..."
    }
  ]
}

Request Parameters

Field Type Required Description
query string yes The search query
count integer no Number of results (1-20, default 8)

Errors

Status Message
400 "query is required and must be non-empty"
402 "insufficient credits for web search"
502 "web search unavailable"

Pricing

Web search is billed per request from your credits balance. You can check the current price via the pricing CLI command. See Billing for more details.