# Web Search API

> Search the web and get structured results (titles, URLs, snippets). DuckDuckGo-backed — no browser, no CAPTCHA, fast.

Category: [Search APIs](https://upapi.io/apis/search) · Last updated 2026-11-13

## How to call it

- Endpoint: `POST https://api.upapi.io/web-search.post`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 30 seconds.
- Cache: identical requests are served from cache for 300 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/web-search.post

```bash
curl -X POST https://api.upapi.io/web-search.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "query": "typescript", "region": "wt-wt", "maxResults": 20 }'
```

## Request parameters

- `query` (string, required) — Search query
- `region` (string) — Region code (wt-wt=global, us-en, uk-en, etc)
- `timeLimit` (string) — Only results from the last day (d), week (w), month (m) or year (y)
- `maxResults` (integer) — Max results to return

## Response fields

- `query` (string, required)
- `message` (string, required)
- `results` (array, required)
- `results[].url` (string, required)
- `results[].title` (string, required)
- `results[].domain` (string, required)
- `results[].snippet` (string, required)
- `results[].position` (integer, required)
- `success` (boolean, required)
- `elapsedMs` (integer, required)
- `fetchedAt` (string, required)
- `totalResults` (integer, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "query": "typescript",
  "region": "wt-wt",
  "maxResults": 20
}
```

```json
{
  "query": "typescript",
  "message": "example",
  "results": [
    {
      "url": "https://github.com",
      "title": "Alan Turing",
      "domain": "example",
      "snippet": "example",
      "position": 1
    }
  ],
  "success": false,
  "elapsedMs": 1,
  "fetchedAt": "example",
  "totalResults": 1
}
```

## Frequently asked questions

### How much does the Web Search API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Web Search API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Web Search API responses cached?

Yes — identical requests are served from cache for 300 seconds, and a cache hit is not billed.

## More Search APIs

- [Google Search](https://upapi.io/apis/search/google-search)
- [Google Autocomplete](https://upapi.io/apis/search/google-autocomplete)
- [LinkedIn Profile Search](https://upapi.io/apis/search/linkedin-profile-search)
