# SERP Search API (web.search)

- Canonical page: https://everyinfra.com/en/web-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "web", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, max 10 per call (larger values are capped)
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=web&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the web search query expression. Returns result titles, URLs, and snippets; it does not fetch the full page content of the search results or filter by platform name. |
| country | not declared | no | not declared | Sets a country or region preference for search results using a code such as us. It affects geographic relevance, not the calling server's location, and does not guarantee that every result is located in that country. |
| language | not declared | no | not declared | Sets the search interface and result-language preference, such as en or zh-cn. It does not translate the returned page content. |
| limit | integer (1–10) | no | not declared | The most rows to return in this call, an integer from 1 to 10. The default applies when you leave it out, and a call can return fewer rows. Larger values are accepted and capped at the maximum. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| title | Title. null when the platform has no titles (for example text-only posts). |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| rank | platform-native meaning |
| published_at | platform-native meaning |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| sub_links | platform-native meaning |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "web",
  "action": "search",
  "params": {
    "keyword": "Python documentation"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "web",
        "action": "search",
        "params": {
            "keyword": "Python documentation",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 7. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "web",
  "action": "search",
  "results": [
    {
      "title": "3.14.7 Documentation",
      "url": "https://docs.python.org/",
      "text": "What's new in Python 3.14? Or all \"What's new\" documents since Python 2.0 ; Tutorial Start here: a tour of Python's syntax and features ; Built-ins reference",
      "rank": 1
    },
    {
      "title": "Our Documentation",
      "url": "https://www.python.org/doc/",
      "text": "Browse the docs online or download a copy of your own. Python's documentation, tutorials, and guides are constantly evolving. Get started here,",
      "rank": 2
    }
  ],
  "count": 7,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=web
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
