# CodePulse API - Web Search

> CodePulse API - Web Search is a paid API for AI agents from codepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Performs a web search and returns ranked results with URLs, titles, and snippets for a given query

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/web/search
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-api-web-search-98b94311
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9-Dp6Bqf3G_a_LQdbC4lz

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 codepulse-api-web-search-98b94311 -d '<json body>'
```

Example prompt: Search the web for 'best open-source LLM frameworks 2026' and give me the top results with their titles and URLs.

## When to prefer this

Use this endpoint when an AI agent needs real-time web search results without managing API keys, and is willing to pay $0.03 USDC per call via x402 on Base. Ideal for agents that need fresh web data on demand in a pay-per-use model without subscription overhead.

## Known failure modes

- Query not supported — 'supported' field returns false with lower confidence
- Empty results list if no relevant pages are found
- Ambiguous or very short queries may return low-confidence results
- Payment failure if USDC balance is insufficient on Base
- Rate or timeout errors from the underlying search provider

## How this service works

Performs web searches using a free DuckDuckGo HTML parser. Returns organic search results.

## Output

Returns a JSON object containing a list of search results, each with a URL, title, and snippet; plus a confidence rating (e.g. 'high'), a data_as_of date, any warnings, and a disclaimer. The supported field confirms the query type is handled.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "Search query keywords"
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "results": [
    {
     "url": "https://example.com/ai-article",
     "title": "Example AI Article",
     "snippet": "This is a brief description of the AI article."
    }
   ]
  },
  "warnings": [],
  "supported": true,
  "confidence": "high",
  "data_as_of": "2026-06",
  "disclaimer": "Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/codepulse-api-web-search-98b94311/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/codepulse-api.hahavoid0.workers.dev/llms.txt)
