# firstmention websearch

> firstmention websearch is a paid API for AI agents from api.firstmention.uk, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-31).

Search the web across curated sources (Hacker News, GitHub, Wikipedia, Stack Exchange) and return ranked results with snippets

## Facts

- Endpoint: GET https://api.firstmention.uk/s/websearch/brief?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/firstmention-websearch-58d7af55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TOA9hrcNjfpY0xSCakEQY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability firstmention-websearch-58d7af55
```

Example prompt: Search for 'x402 payment protocol' across GitHub and Hacker News and give me the top 5 results in JSON format.

## When to prefer this

Use this endpoint when an agent needs ranked web search results with snippets from developer-oriented sources (GitHub, Hacker News, Stack Exchange, Wikipedia) and can pay $0.03 per call via x402 USDC on Base. Prefer this over general web search APIs when the query is technical or developer-focused, when source filtering (e.g. GitHub-only) adds value, and when relevance scoring is needed. Not ideal for broad consumer news or real-time social media search.

## Known failure modes

- Missing required query parameter 'q' returns a 400 error
- Limit value outside 1–20 range is rejected
- Invalid source string in 'sources' parameter may return empty results or error
- Payment not completed via x402/USDC causes 402 response before search executes
- Network issues reaching upstream sources may reduce result count or return ok:false

## How this service works

Pay-per-call HTTP APIs, paid with x402 in USDC on Base (eip155:8453): agentkit, api-change-check, basedue, basewatch, chainread, check-sanctions, chgwatch, company-facts, composite, edgar, feednews, pageaudit, solcheck, token-dd, txpreflight, walletcheck, webmd, webread, websearch, x402index. Each operation describes its service.

## Output

A JSON object containing: ok (boolean), query (echoed string), count (number of results returned), and a results array where each item has url, title, source (hn/github/wiki/se), snippet, and relevance score (0–1 float). Optionally returned as Markdown if format=md is requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "Search query"
      },
      "url": {
       "type": "string",
       "description": "Direct page URL (alternative to q) to extract"
      },
      "chars": {
       "type": "integer",
       "maximum": 20000,
       "minimum": 200,
       "description": "Max characters per extracted page (default 4000)"
      },
      "extract": {
       "type": "integer",
       "maximum": 6,
       "minimum": 1,
       "description": "How many top hits to extract (default 4)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "query": {
       "type": "string"
      },
      "results": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string"
         },
         "title": {
          "type": "string"
         },
         "words": {
          "type": "number"
         },
         "markdown": {
          "type": "string"
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "count": 3,
  "query": "x402 payments",
  "results": [
   {
    "url": "https://github.com/coinbase/x402",
    "title": "x402",
    "source": "github",
    "snippet": "An open protocol for payments on the web.",
    "relevance": 0.92
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/firstmention-websearch-58d7af55/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.firstmention.uk](https://www.zero.xyz/host/api.firstmention.uk/llms.txt)
