# 2s.io Web Search API

> 2s.io Web Search API is a paid API for AI agents from 2s.io, paid per call via x402, $0.009/call, status unknown (last checked 2026-09-14).

Performs live web searches returning ranked results with title, URL, snippet, site name, and page age, supporting filtering by count, offset, country, freshness, and safesearch.

## Facts

- Endpoint: GET https://2s.io/api/search/web
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-web-search-api-dce77022
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-EfSqUx1WjCwESxzjSFAI

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 2s-io-web-search-api-dce77022
```

Example prompt: Search the web for the latest developments in fusion energy research — show me 10 results from the past month, US region only, with moderate safesearch.

## When to prefer this

Use this endpoint when you need live, up-to-date web search results beyond any LLM training cutoff — especially for current events, recent documentation, fact-checking, or time-sensitive research. Prefer this over the sibling /api/news/search when you want general web pages rather than news-specific articles with sources and timestamps. Choose this over cached or static knowledge bases when freshness is critical.

## Known failure modes

- Missing required 'q' parameter returns a 400 error
- Invalid country code may return empty or unfiltered results
- Invalid freshness format (not pd/pw/pm/py or YYYY-MM-DDtoYYYY-MM-DD) may cause error or be ignored
- count out of range (below 1 or above 20) rejected by schema
- offset out of range (above 9) rejected by schema
- Payment failure (x402) returns 402 with payment requirements
- Query with no matching results returns empty results array

## How this service works

Live web search. Returns ranked results with title, URL, snippet description, site name, and page age — fresh information past any model training cutoff. Supports count (1-20), offset for paging, country (2-letter, e.g. US), freshness (pd=past day, pw=past week, pm=past month, py=past year, or a YYYY-MM-DDtoYYYY-MM-DD range), and safesearch (off/moderate/strict). Use for current events, fact verification, finding documentation, and research. Independent search index. For news-specific results with sources and timestamps see /api/news/search.

## Output

Returns a ranked list of up to 20 web results, each containing: page title, URL, snippet/description, site name, and page age. Results are fresh and sourced from a live independent search index beyond any LLM training cutoff.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "q": "artificial intelligence",
   "count": 10,
   "offset": 0,
   "country": "US",
   "freshness": "pm",
   "safesearch": "moderate"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Search query."
      },
      "count": {
       "type": "integer",
       "default": 10,
       "maximum": 20,
       "minimum": 1
      },
      "offset": {
       "type": "integer",
       "default": 0,
       "maximum": 9,
       "minimum": 0,
       "description": "Result page offset."
      },
      "country": {
       "type": "string",
       "description": "2-letter country code, e.g. US."
      },
      "freshness": {
       "type": "string",
       "description": "pd | pw | pm | py | YYYY-MM-DDtoYYYY-MM-DD."
      },
      "safesearch": {
       "enum": [
        "off",
        "moderate",
        "strict"
       ],
       "type": "string",
       "default": "moderate"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-web-search-api-dce77022/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
