# Introduction

> Search1API gives AI applications one API for discovering, reading, and structuring information from the live web.

Canonical URL: https://www.search1api.com/docs

Search1API gives AI applications live web access through one API. It combines web and news search, page crawling, site discovery, trending feeds, and schema-driven extraction behind the same base URL and API key.

Use it when an agent, RAG pipeline, or backend needs current information without maintaining search-engine adapters or scraping infrastructure.

## A simple mental model

- [Discover](https://www.search1api.com/docs/basic/search): Find relevant pages with web search, recent coverage with news search, or current developer topics with trending feeds.
- [Read](https://www.search1api.com/docs/basic/crawl): Turn one page into clean text, fetch the top search results with crawl_results, or crawl a site asynchronously.
- [Structure](https://www.search1api.com/docs/advanced/extract): Extract fields from a page into a JSON shape you define.

Most agent workflows begin with `/search`. Add `crawl_results` when the model needs the source text rather than links and snippets. If you already have a URL, start with `/crawl` instead.

For the complete decision guide, see [Choosing an endpoint](https://www.search1api.com/docs/guides/choosing-an-endpoint).

## Choose your starting point

- [Make your first API call](https://www.search1api.com/docs/get-started/quickstart): Create a key, run one request, and understand the response.
- [Connect an AI tool](https://www.search1api.com/docs/integrations/mcp): Use Search1API through MCP, the CLI, or an agent skill.
- [Choose an endpoint](https://www.search1api.com/docs/guides/choosing-an-endpoint): Match search, crawl, extract, sitemap, and deepcrawl to your task.

## When you are ready for production

- [Authentication](https://www.search1api.com/docs/essentials/authentication): Store, separate, and revoke API keys safely.
- [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits): Understand request costs, balances, and rate limits.
- [Error handling](https://www.search1api.com/docs/essentials/error-handling): Handle validation, authentication, payment, and upstream failures.

---

# Quickstart

> Create an API key, make one web search request, and understand the response.

Canonical URL: https://www.search1api.com/docs/get-started/quickstart

<Steps>
  <Step>
    ### Get an API key

    Sign up at [dashboard.search1api.com](https://dashboard.search1api.com), then open **API Keys** and create a key. New accounts receive 100 credits without a credit card.

    Keep the key server-side. For local development, put it in an environment variable:

    ```bash
    export SEARCH1API_KEY="YOUR_API_KEY"
    ```
  </Step>

  <Step>
    ### Search the web

    ```bash
    curl -X POST https://api.search1api.com/search \
      -H "Authorization: Bearer $SEARCH1API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query": "best open source vector databases"}'
    ```
  </Step>

  <Step>
    ### Read the response

    ```json
    {
      "searchParameters": {
        "query": "best open source vector databases",
        "max_results": 5
      },
      "results": [
        {
          "title": "Qdrant - Vector Database",
          "link": "https://qdrant.tech/",
          "snippet": "Qdrant is an open source vector database...",
          "content": ""
        }
      ]
    }
    ```

    Search returns up to five results by default. `snippet` is the search engine summary. `content` is populated when you ask Search1API to crawl a result.
  </Step>

  <Step>
    ### Decide what to build next

    Your first request is complete. From here:

    * If the model needs full page text, learn how to use `crawl_results` in [Improving search results](https://www.search1api.com/docs/guides/improving-search-results#read-the-results-not-just-the-snippets).
    * If you are starting from a URL or need structured data, use [Choosing an endpoint](https://www.search1api.com/docs/guides/choosing-an-endpoint).
    * Before production, review [Authentication](https://www.search1api.com/docs/essentials/authentication), [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits), and [Error handling](https://www.search1api.com/docs/essentials/error-handling).
  </Step>
</Steps>

## Other ways to connect

- [Search API reference](https://www.search1api.com/docs/basic/search): Review every request field and response schema.
- [MCP server](https://www.search1api.com/docs/integrations/mcp): Connect an MCP-compatible AI client without writing API code.
- [CLI](https://www.search1api.com/docs/integrations/cli): Search and crawl from your terminal.

---

# Authentication

> Create, send, separate, and revoke Search1API API keys safely.

Canonical URL: https://www.search1api.com/docs/essentials/authentication

Search1API uses bearer tokens. Send the same header to every authenticated endpoint at `https://api.search1api.com`:

```http
Authorization: Bearer YOUR_API_KEY
```

## Get a key

Sign in at [dashboard.search1api.com](https://dashboard.search1api.com), open **API Keys**, and create a key. The dashboard lets you label, reveal, copy, and delete existing keys.

## Keep keys server-side

Treat a key like a password. Store it in an environment variable or secret manager, and never expose it in browser code, mobile binaries, logs, or a public repository.

> **warn:** Anyone who has the key can make requests against your account balance. If a key leaks, replace it and delete the old key immediately.

## Separate keys by workload

Use different keys for environments or services so you can identify traffic and revoke one integration without interrupting the others. Add a clear label in the dashboard, such as `production-api`, `staging`, or `claude-mcp`.

All keys owned by the same account draw from the same credit balance. Separate keys improve attribution and revocation; they do not create separate balances.

## Rotate or revoke a key

There is no in-place rotation action. To replace a key:

1. Create a new key.
2. Update the application or integration.
3. Confirm requests succeed with the new key.
4. Delete the old key.

Deleting a key revokes it. Requests that continue using it return `401 Unauthorized`.

## Authentication failures

An invalid or revoked bearer token returns `401`. A request with no bearer token currently receives a `402` payment challenge on paid endpoints because Search1API also supports pay-per-request payment protocols.

See [Error handling](https://www.search1api.com/docs/essentials/error-handling) for response bodies and recovery guidance.

---

# Credits and limits

> Understand Search1API request costs, account balances, rate limits, and timeouts.

Canonical URL: https://www.search1api.com/docs/essentials/credits-and-limits

Search1API deducts credits after successful requests. Failed requests are not charged.

## Request costs

| Endpoint                         | Credits |
| -------------------------------- | ------- |
| `POST /search`                   | 1       |
| `POST /news`                     | 1       |
| `POST /crawl`                    | 1       |
| `POST /sitemap`                  | 1       |
| `POST /trending`                 | 1       |
| `POST /extract`                  | 10      |
| `POST /deepcrawl`                | 20      |
| `GET /deepcrawl/status/{taskId}` | free    |
| `GET /usage`                     | free    |

## Search with full page content

`/search` and `/news` have a dynamic cost when you set `crawl_results`:

```text
1 credit for the search + 1 credit for each page crawled successfully
```

For example, if `crawl_results` is `4` and three pages return content, the request costs 4 credits. The unsuccessful crawl is not charged. `crawl_results` cannot be greater than `max_results`.

Batch requests are calculated item by item. A failed item has a cost of zero even when other items in the batch succeed.

## Free and paid credits

New accounts receive 100 credits without a credit card or expiration date. Subscriptions reset an allowance each month; one-time credit packs do not expire. When both balances are available, subscription credits are deducted before one-time credits.

See the [pricing page](https://www.search1api.com/pricing) for current plans and pack sizes.

## Check your balance

```bash
curl https://api.search1api.com/usage \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json
{ "usage": 24980 }
```

The `usage` field is the number of credits remaining. When the balance cannot cover a successful request, the API returns `402 Payment Required` instead of the original success response.

## Rate limit

The standard limit is **200 requests per minute per API key**. A request above the limit returns `429 Too Many Requests`.

There is no `Retry-After` header. Retry with exponential backoff, starting around one second. Contact [sys@search1api.com](mailto:sys@search1api.com) if you need a higher limit.

## Client timeouts

Search and result-crawling operations can wait up to 20 seconds for an upstream service. Set the client timeout above that boundary; 30 seconds is a practical starting point.

`POST /deepcrawl` is asynchronous. A successful start returns `202 Accepted` with a `taskId`; poll `GET /deepcrawl/status/{taskId}` for the result. Status checks cost no credits.

> **info:** For status-specific recovery behavior, see [Error handling](https://www.search1api.com/docs/essentials/error-handling).

---

# Error handling

> Handle Search1API authentication, payment, validation, rate-limit, and upstream errors.

Canonical URL: https://www.search1api.com/docs/essentials/error-handling

Most API errors are JSON objects with `ok: false` and either `error`, `message`, or both. Validation errors also include an `errors` array.

```json
{ "error": "Unauthorized: Invalid API Key", "ok": false }
```

## Status codes

| Status | Meaning                                                                      | What to do                                                                           |
| ------ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `400`  | Malformed JSON or an invalid request value handled outside schema validation | Fix the request body and headers.                                                    |
| `401`  | Invalid, revoked, or malformed bearer token                                  | Check the key and the `Authorization` header.                                        |
| `402`  | Payment challenge or insufficient account credits                            | Add a bearer token, complete the payment flow, or add credits.                       |
| `404`  | No search results, or a deepcrawl task was not found                         | Treat search `404` as zero results; verify a deepcrawl task ID before polling again. |
| `410`  | A discontinued reasoning endpoint                                            | Remove calls to `/v1/chat/completions` and `/v1/models`.                             |
| `422`  | Request body failed schema validation                                        | Read the `errors` array and fix the named fields.                                    |
| `429`  | More than 200 requests per minute on one key                                 | Back off and retry.                                                                  |
| `502`  | An upstream service failed or timed out                                      | Retry with backoff.                                                                  |
| `500`  | An unexpected gateway or service error                                       | Retry; contact support if it persists.                                               |

## Understand 402 responses

A paid endpoint can return `402` for two different reasons.

### No bearer token

Search1API supports pay-per-request payment protocols. A request without a bearer token receives a payment challenge such as:

```json
{
  "type": "https://paymentauth.org/problems/payment-required",
  "title": "Payment Required",
  "status": 402,
  "detail": "Payment is required (Search1API - Search API)."
}
```

If you intended to use account credits, add `Authorization: Bearer YOUR_API_KEY`. A bearer token that is present but invalid returns `401` instead.

### Not enough credits

When a request succeeds but its final cost is higher than the remaining balance, billing replaces the success response with `402` and an insufficient-credits message. Check the balance with `GET /usage` or add credits from the dashboard.

## Fix validation errors

Search and news validation failures return `422` with an `errors` array:

```json
{
  "ok": false,
  "message": "Query cannot be empty",
  "errors": [
    { "field": "query", "message": "Query cannot be empty", "code": "too_small" }
  ]
}
```

Common causes include an empty `query`, `max_results` below 1, or `crawl_results` greater than `max_results`. See the endpoint's API reference for its complete schema.

## Treat a search 404 as zero results

`/search` and `/news` return `404` when the upstream search completes but finds no results. This is not a service outage, and the request is not charged. Broaden the query or remove narrow site and time filters.

## Retry safely

Search and crawl requests have no write-side effects. Retry `429`, `502`, and transient `500` responses with exponential backoff and jitter. Do not retry `400`, `401`, `402`, or `422` until you have changed the request or account state.

> **info:** Failed requests are not charged. In a batch request, successful items are charged and failed items have a cost of zero.

If a `500` or `502` persists, contact [sys@search1api.com](mailto:sys@search1api.com) with the endpoint, timestamp, and a redacted request body. Never send your API key.

---

# Choosing an endpoint

> Match a Search1API endpoint to the information you have and the result you need.

Canonical URL: https://www.search1api.com/docs/guides/choosing-an-endpoint

Start with two questions:

1. Do you have a topic, a URL, or an entire site?
2. Do you need links, readable text, structured fields, or a list of pages?

## Endpoint map

| Your starting point | What you need                     | Use                                                  |
| ------------------- | --------------------------------- | ---------------------------------------------------- |
| A topic or question | Ranked web pages                  | [`POST /search`](https://www.search1api.com/docs/basic/search)                      |
| A topic or question | Ranked pages plus full text       | [`POST /search`](https://www.search1api.com/docs/basic/search) with `crawl_results` |
| A current event     | Recent coverage from news sources | [`POST /news`](https://www.search1api.com/docs/basic/news)                          |
| One URL             | Readable page content             | [`POST /crawl`](https://www.search1api.com/docs/basic/crawl)                        |
| One URL             | Fields that match a JSON Schema   | [`POST /extract`](https://www.search1api.com/docs/advanced/extract)                 |
| One site            | A list of its URLs                | [`POST /sitemap`](https://www.search1api.com/docs/advanced/sitemap)                 |
| One site            | Content from many pages           | [`POST /deepcrawl`](https://www.search1api.com/docs/advanced/deepcrawl)             |
| No query            | GitHub or Hacker News trends      | [`POST /trending`](https://www.search1api.com/docs/advanced/trending)               |

## Topic or URL: search vs. crawl

Use `/search` when you need to discover relevant pages. Use `/crawl` when you already know which page to read.

When you begin with a topic but also need source text, set `crawl_results` on `/search`. Search1API will crawl the top results in the same request. See [Improving search results](https://www.search1api.com/docs/guides/improving-search-results#read-the-results-not-just-the-snippets) for the request pattern.

## Text or fields: crawl vs. extract

Use `/crawl` when a model or person will read the page as text: summarization, question answering, or RAG ingestion.

Use `/extract` when your application needs typed fields in a predictable shape. You provide the URL, an extraction prompt, and a JSON Schema; the endpoint returns data that follows that schema.

If you plan to crawl a page and immediately ask a model to convert it into fields, `/extract` combines those steps.

## URL list or site content: sitemap vs. deepcrawl

Use `/sitemap` to discover which URLs a site contains. It returns links synchronously and is useful when your application will decide what to fetch next.

Use `/deepcrawl` when you need content from many pages. It runs asynchronously: the start request returns `202 Accepted` with a `taskId`, and you poll `GET /deepcrawl/status/{taskId}` until the task finishes.

## Web coverage or recent reporting: search vs. news

Use `/search` for general web discovery. Use `/news` when recency and news-specific sources are central to the task. Both endpoints support `time_range`, but they search different source sets.

## A common agent workflow

For research and answer-generation agents:

1. Start with `/search` and a small `crawl_results` value to collect ranked sources and readable text.
2. Use `/crawl` only when you need to revisit a specific URL.
3. Use `/extract` when the output must follow a stable data schema.

Review [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits) before choosing crawl depth or running the workflow in a batch.

---

# Improving search results

> Choose sources, retrieve full page text, and narrow Search1API results by site, time, and language.

Canonical URL: https://www.search1api.com/docs/guides/improving-search-results

Begin with the default search behavior, then add constraints only when the results show that you need them.

## Let Search1API choose sources by default

If you omit `search_service`, Search1API runs several engines concurrently and fuses their rankings into one result list. Keep this default when you want broad web coverage.

Set `search_service` when the source itself is part of the request:

```json
{ "query": "rust async runtime", "search_service": "reddit" }
```

For example, Reddit is useful for experience reports, GitHub for code and issues, arXiv for papers, and YouTube for video.

## Available web search sources

| Source       | Useful for                         |
| ------------ | ---------------------------------- |
| `google`     | General web                        |
| `bing`       | General web                        |
| `duckduckgo` | General web                        |
| `yahoo`      | General web                        |
| `x`          | Posts and reactions on X           |
| `reddit`     | Discussions and experience reports |
| `github`     | Code, repositories, and issues     |
| `youtube`    | Video                              |
| `arxiv`      | Preprints and academic papers      |
| `wikipedia`  | Encyclopedic background            |
| `imdb`       | Film and television                |
| `wechat`     | WeChat public-account articles     |
| `bilibili`   | Chinese-language video             |
| `baidu`      | Chinese-language general web       |
| `sogou`      | Chinese-language general web       |
| `quark`      | Chinese-language general web       |
| `360`        | Chinese-language general web       |

`/news` uses a separate source set: `google`, `bing`, `duckduckgo`, `yahoo`, `hackernews`, and `reuters`. Omitting `search_service` also enables the default multi-source behavior for news.

`/trending` supports `github` and `hackernews`, and requires `search_service`.

## Read the results, not just the snippets

Search results include a short `snippet`. When a model needs the source text, set `crawl_results` to crawl the top results and populate their `content` fields:

```bash
curl -X POST https://api.search1api.com/search \
  -H "Authorization: Bearer $SEARCH1API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "postgres connection pooling best practices",
    "max_results": 10,
    "crawl_results": 3
  }'
```

This returns up to ten ranked results and attempts to add full text to the top three. `crawl_results` must be no greater than `max_results`.

> **info:** A search costs 1 credit, plus 1 credit for each page crawled successfully. See [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits#search-with-full-page-content).

## Narrow by site

Use `include_sites` to search only selected domains and `exclude_sites` to remove unwanted ones:

```json
{
  "query": "vector database benchmarks",
  "include_sites": ["github.com", "news.ycombinator.com"],
  "exclude_sites": ["pinterest.com"]
}
```

> **warn:** A narrow `include_sites` list combined with a specific query can produce `404 No results found`. Remove constraints one at a time before treating it as an outage.

## Narrow by time or language

`time_range` accepts `day`, `week`, `month`, or `year`. Use it when freshness matters instead of adding words such as “latest” to the query.

`language` accepts a language code such as `en`, `zh-CN`, or `fr`. Search1API does not expose a separate country or region parameter.

## Control result count

`max_results` defaults to 5 and accepts values from 1 to 50. The gateway clamps numeric values above 50 to 50.

For the complete request schema, image results, batch bodies, and response fields, see the [Search API reference](https://www.search1api.com/docs/basic/search).

---

# MCP server

> Give Claude, Cursor, VS Code or any MCP client live web access with a hosted Search1API MCP endpoint — no code required.

Canonical URL: https://www.search1api.com/docs/integrations/mcp

Search1API runs a hosted MCP server at:

```
https://mcp.search1api.com/mcp
```

Point an MCP client at it with your API key and the model can search the web, read pages and check what's trending — without you writing an integration.

## Tools it exposes

| Tool        | What it does                | Required         |
| ----------- | --------------------------- | ---------------- |
| `search`    | Web search                  | `query`          |
| `news`      | News search                 | `query`          |
| `crawl`     | Read a URL                  | `url`            |
| `sitemap`   | List a site's links         | `url`            |
| `trending`  | GitHub / Hacker News trends | `search_service` |
| `reasoning` | Deep reasoning              | `content`        |

> **warn:** The `reasoning` tool is currently unavailable while the underlying service is rebuilt — calls to it fail. The other five work normally.

## Connect your client

Get a key from [dashboard.search1api.com](https://dashboard.search1api.com), then use the config for your client. The dashboard's **MCP** page generates these for you with the key already filled in.

<Tabs items="['Claude Code', 'Claude Desktop', 'Cursor', 'VS Code', 'Windsurf', 'Claude.ai']">
  <Tab value="Claude Code">
    ```bash
    claude mcp add --transport http search1api https://mcp.search1api.com/mcp \
      --header "Authorization: Bearer YOUR_SEARCH1API_KEY"
    ```
  </Tab>

  <Tab value="Claude Desktop">
    ```json
    {
      "mcpServers": {
        "search1api": {
          "url": "https://mcp.search1api.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_SEARCH1API_KEY"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab value="Cursor">
    ```json
    {
      "mcpServers": {
        "search1api": {
          "url": "https://mcp.search1api.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_SEARCH1API_KEY"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab value="VS Code">
    Note the different key (`servers`, not `mcpServers`) and the required `type`:

    ```json
    {
      "servers": {
        "search1api": {
          "type": "http",
          "url": "https://mcp.search1api.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_SEARCH1API_KEY"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab value="Windsurf">
    Windsurf passes the key in the URL rather than a header:

    ```json
    {
      "mcpServers": {
        "search1api": {
          "serverUrl": "https://mcp.search1api.com/mcp?apiKey=YOUR_SEARCH1API_KEY"
        }
      }
    }
    ```
  </Tab>

  <Tab value="Claude.ai">
    **Settings → Connectors → Add custom connector**, then paste:

    ```
    https://mcp.search1api.com/mcp?apiKey=YOUR_SEARCH1API_KEY
    ```
  </Tab>
</Tabs>

## How auth works

The server takes your key from the `Authorization: Bearer <key>` header, and falls back to an `?apiKey=<key>` query parameter for clients that cannot send headers. The header wins when both are present.

Query-parameter auth means your key travels in a URL, where it can end up in logs and shell history. Prefer the header whenever the client supports it.

## Running it locally instead

The server also runs over stdio, straight from npm:

```json
{
  "mcpServers": {
    "search1api": {
      "command": "npx",
      "args": ["-y", "search1api-mcp"],
      "env": {
        "SEARCH1API_KEY": "YOUR_SEARCH1API_KEY"
      }
    }
  }
}
```

Same tools, same key, no network hop to us for the MCP protocol itself — the API calls still go out to `api.search1api.com`.

## Billing

MCP tool calls are ordinary API calls: they spend the same credits at the same rates as calling the endpoints yourself. See [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits).

Source: [github.com/fatwang2/search1api-mcp](https://github.com/fatwang2/search1api-mcp)

---

# CLI

> Search the web, read pages and check trends from your terminal with the Search1API CLI.

Canonical URL: https://www.search1api.com/docs/integrations/cli

`s1` puts the whole API in your terminal — and, because it prints JSON on demand, in your shell scripts too.

## Install

```bash
curl -fsSL https://cli.search1api.com/install.sh | bash
```

That installs a standalone binary; no Node.js required. If you would rather use npm:

```bash
npm install -g search1api-cli
```

## Log in

```bash
s1 login
```

This opens a browser, and saves the key for you. On a headless box, use `s1 login --no-browser`, or set the key directly:

```bash
s1 config set-key YOUR_API_KEY
# or
export SEARCH1API_KEY=YOUR_API_KEY
```

`s1 config show` prints what it is currently using.

## Commands

| Command                            | What it does             |
| ---------------------------------- | ------------------------ |
| `s1 search "<query>"`              | Search the web           |
| `s1 news "<query>"`                | Search the news          |
| `s1 crawl <url>`                   | Read a page              |
| `s1 sitemap <url>`                 | List a site's links      |
| `s1 trending <github\|hackernews>` | Trending topics          |
| `s1 balance`                       | Remaining credits        |
| `s1 login`                         | Authorize in the browser |
| `s1 config set-key \| show`        | Manage configuration     |
| `s1 update`                        | Update `s1` in place     |

## Examples

```bash
# Five results from Google
s1 search "rust async" -n 5 -s google

# Search, then crawl the top 3 results for their full text
s1 search "web framework" -c 3

# Today's news, from Hacker News
s1 news "tech layoffs" -s hackernews -t day

# Machine-readable output, straight into jq
s1 search "test" --json | jq '.results[0].title'
```

The `--json` flag is what makes `s1` scriptable: pipe it into `jq`, feed it to a model, commit it to a file.

## Flags worth knowing

| Flag                            | Meaning                               |
| ------------------------------- | ------------------------------------- |
| `-n, --max-results`             | 1–50, defaults to 10                  |
| `-s, --service`                 | Pick an engine; omit to race several  |
| `-c, --crawl <N>`               | Crawl the top N results for full text |
| `--include` / `--exclude`       | Restrict or exclude sites             |
| `-t, --time <day\|month\|year>` | Time range                            |
| `--json`                        | Raw JSON instead of formatted output  |

> **info:** `-c/--crawl` is the same deep-search feature as the API's `crawl_results`, and bills the same way: 1 credit for the search plus 1 per page successfully crawled. See [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits).

The `s1 reasoning` command is currently unavailable while the underlying service is rebuilt.

Source: [github.com/fatwang2/search1api-cli](https://github.com/fatwang2/search1api-cli)

---

# Agent skill

> Install the Search1API skill so Claude knows when to search, when to crawl, and how to tune the query — not just how to call the API.

Canonical URL: https://www.search1api.com/docs/integrations/skills

An MCP server tells an agent *what it can call*. A skill tells it *when and how* — which is the part that actually determines whether the answers are any good.

## Install

```bash
npm install -g search1api-cli
npx skills add fatwang2/search1api-cli
```

The skill drives the `s1` CLI, so the CLI has to be installed and logged in first. If it isn't, the skill will walk the user through it.

## What it changes

Without the skill, an agent with web access tends to fire one default search and paste the snippets back. The skill teaches it to adapt:

* A URL in the conversation means **crawl it**, not search for it.
* A quick factual lookup gets `-n 5` and no crawling. A deep research question gets `-n 15`, then crawls the top 3–5 for full text.
* Words like "latest" or "today" become `-t day`, rather than being typed into the query.
* It defines end-to-end workflows — deep research, URL summarization, trending deep-dives — instead of one-shot calls.
* It always synthesizes an answer rather than dumping raw results.

That is the difference between an agent that *has* a search tool and one that *knows how to search*.

## Using it

Once installed, just talk to your agent normally:

* "search for the latest AI news"
* "what does this link say? [https://example.com](https://example.com)"
* "what's trending on GitHub?"
* "research quantum computing thoroughly"

The skill picks the command, the engine, the result count and whether to crawl.

## Cost

The skill calls the same API as everything else, and spends the same credits — deep research modes crawl pages, so they cost more than a plain search. See [Credits and limits](https://www.search1api.com/docs/essentials/credits-and-limits).

Source: [github.com/fatwang2/search1api-cli/tree/master/skills/search1api](https://github.com/fatwang2/search1api-cli/tree/master/skills/search1api)

---

# OpenAPI and llms.txt

> Machine-readable entry points to Search1API — an OpenAPI schema for code generators, and llms.txt for agents.

Canonical URL: https://www.search1api.com/docs/integrations/openapi

Machine-readable entry points let tools discover Search1API without scraping the rendered docs.

## OpenAPI schema

```
https://api.search1api.com/openapi.json
```

Point a code generator at it and you get a typed client in your language, no hand-written wrapper needed. It is also what lets tools like Postman, Insomnia or an agent framework import the API in one step.

Every response we serve advertises it too, via a `Link` header with `rel="service-desc"` — so a client that follows link relations can find the schema on its own.

## llms.txt files

```
https://www.search1api.com/llms.txt
```

This is the curated, product-wide index for language models: product overview, pricing, documentation, agent interfaces, and the OpenAPI schema, all as links with one-line descriptions.

The docs app also publishes two files generated from the current Fumadocs source:

* [`/docs/llms.txt`](https://www.search1api.com/docs/llms.txt) — a compact index of every documentation page.
* [`/docs/llms-full.txt`](https://www.search1api.com/docs/llms-full.txt) — the full documentation as clean Markdown, with imports and rendering code removed.

The product-wide [`/llms-full.txt`](https://www.search1api.com/llms-full.txt) automatically combines the curated product index, the agent-friendly [`/pricing.md`](https://www.search1api.com/pricing.md), and the generated full documentation.

## Which to use

Generating a client, or importing the API into a tool? Use the OpenAPI schema. Helping a model discover the product? Use the root `llms.txt`. Providing the documentation as context? Use `/docs/llms-full.txt` or the combined root `/llms-full.txt`. Building an agent that will actually *call* the API? Use the [MCP server](https://www.search1api.com/docs/integrations/mcp).

---

# Search

> Search the web across multiple engines and return ranked results, optional images, and full page content for selected results.

Canonical URL: https://www.search1api.com/docs/basic/search



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# News

> Search recent news across multiple sources with site, language, and time filters, plus optional full page content.

Canonical URL: https://www.search1api.com/docs/basic/news



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Crawl

> Fetch a web page and return clean, readable content for agents, summarization, and retrieval workflows.

Canonical URL: https://www.search1api.com/docs/basic/crawl



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Extract (Beta)

> Extract structured data from a URL based on a prompt and schema. Every request costs 10 credits.

Canonical URL: https://www.search1api.com/docs/advanced/extract



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Deepcrawl (Beta)

> API endpoints for initiating and monitoring asynchronous deep crawl tasks. Every request costs 20 credits.

Canonical URL: https://www.search1api.com/docs/advanced/deepcrawl



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Trending

> API endpoint for retrieving trending topics from popular platforms

Canonical URL: https://www.search1api.com/docs/advanced/trending



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Reasoning (Discontinued)

> Discontinued. POST /v1/chat/completions returns 410 Gone and is no longer available. Do not build new integrations against this endpoint.

Canonical URL: https://www.search1api.com/docs/advanced/reasoning



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Sitemap

> API endpoint for retrieving sitemap links from a website

Canonical URL: https://www.search1api.com/docs/advanced/sitemap



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Models (Discontinued)

> Discontinued. GET /v1/models returns 410 Gone because the reasoning API is no longer available. Do not build new integrations against this endpoint.

Canonical URL: https://www.search1api.com/docs/utility/models



Complete machine-readable schema: https://api.search1api.com/openapi.json

---

# Usage

> Return the remaining credit balance for the authenticated Search1API account.

Canonical URL: https://www.search1api.com/docs/utility/usage



Complete machine-readable schema: https://api.search1api.com/openapi.json