# Web search API: links or full pages | Spider

Search the web from one API call. Spider returns ranked results, or reads each result and returns the page as markdown, text or HTML for RAG and agents.

Canonical: https://spider.cloud/api/search/

## Search the web. Get the links or the pages.

Send a query and get ranked links back. Set one flag and your agent gets each page as markdown instead.

[Get an API key](https://spider.cloud/register/)

Request

```
curl https://api.spider.cloud/search \  -H "Authorization: Bearer $SPIDER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "search": "rust async runtime comparison",    "limit": 5,    "return_format": "markdown"  }'
```

Response 200, content

1. Tokio vs async-std vs smol: Rust Async Runtime Comparison 2026 https\://reintech.io/blog/tokio-vs-async-std-vs-smol-rust-async-runtime-comparison-2026
2. What is an async runtime? https\://ncameron.org/blog/what-is-an-async-runtime/
3. Async Rust in Three Parts https\://jacko.io/async_intro.html

Captured November 18, 2026 from the search box on this page by a signed-out visitor. The box sent these search fields, with no API key. The first 3 of the 25 ranked results that came back.

On November 18, 2026, [one search from the search box on this page](#recorded-search) returned 25 ranked results.

From $0.001 a search. Pages you fetch cost from $0.16 per 1,000, and cost varies by site.

[Get an API key](https://spider.cloud/register/)

## Run a real search.

This box calls the production endpoint. The timer on the results is your own latency.

search Search query

Reading the pages takes a key. [Get an API key](/register/)

results POST /search

Type a query and press Search. The request goes to the production endpoint.

No sign-in required. 25 free searches per day, returned as links.

## One flag, two responses.

Leave `fetch_page_content` off for a ranked list. Turn it on and each result comes back as a page object.

A query goes to /search, which returns ranked results. With fetch_page_content on, the same call reads each result and returns page objects.

- `page objects` markdown, text or HTML
-
- `content[]` title, description, url
- `search` your query

```
{
  "content": [
    {
      "title": "Web crawler",
      "description": "A web crawler, sometimes called a spider or spiderbot, is an Internet bot that systematically browses…",
      "url": "https://en.wikipedia.org/wiki/Web_crawler"
    }
    // 9 more results
  ]
}
```

The default. Each result is a title, a description and a URL.

```
[
  {
    "url": "https://en.wikipedia.org/wiki/Web_crawler",
    "status": 200,
    "content": "# Web crawler\n\nA web crawler, sometimes called a spider or spiderbot, systematically browses the World Wide Web…",
    "costs": { "total_cost": 0.00036 }
  }
  // one object per result
]
```

Rendered in a browser when the page needs one, cleaned into your format, with its cost on the object.

## Two ways to use it.

### Let the agent choose what to read.

Ask for links and show the model the titles and descriptions. Scrape the two or three it picks. You pay for one search and for the pages you read. Snippets come from the result sites and can arrive truncated, so the recording below keeps the titles and addresses alone.

```
# The search fields the search box on this page sent on November 18, 2026curl https://api.spider.cloud/search \  -H "Authorization: Bearer $SPIDER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "search": "rust async runtime comparison",    "limit": 5,    "return_format": "markdown"  }' # Your model reads the titles. Scrape the pages it chose.curl -X POST https://api.spider.cloud/scrape \  -H "Authorization: Bearer $SPIDER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "url": "https://ncameron.org/blog/what-is-an-async-runtime/",    "return_format": "markdown"  }'
```

The first 5 of the 25 results the search box on this page returned on November 18, 2026 for "rust async runtime comparison". None of the descriptions came back as whole sentences, so each row keeps its title and address. The code above scrapes the one marked picked.

- Tokio vs async-std vs smol: Rust Async Runtime Comparison 2026

  https\://reintech.io/blog/tokio-vs-async-std-vs-smol-rust-async-runtime-comparison-2026

- What is an async runtime? picked

  https\://ncameron.org/blog/what-is-an-async-runtime/

- Async Rust in Three Parts

  https\://jacko.io/async_intro.html

- Async for lib crates in mid-2020: Tokio, Async-Std, Smol – which one to choose? - help - The Rust Programming Language Forum

  https\://users.rust-lang.org/t/async-for-lib-crates-in-mid-2020-tokio-async-std-smol-which-one-to-choose/44661

- Async Rust and Node SerialPort | Roborooter.com

  https\://roborooter.com/post/async-rust-node-serialport/

The recorded body sets three fields. `search` carries the query. `limit` is 5: it counts pages read per result site, not results, and the ranked list that came back held 25 entries. `return_format` names markdown, the shape a fetched page takes. `fetch_page_content` stays off, its default, so nothing was fetched, and a call like it costs one search. The scrape after it pays for one page.

### Ground an answer in live pages.

The question is the query and the fetched pages are the context. You have no index to build or refresh.

[Run this](https://spider.cloud/playground/?mode=search\&p.search=web+scraping+api\&p.search_limit=3\&src=api_search_run)

```
from spider import Spider client = Spider() # The user's question is the search querypages = client.search(    "what changed in the EU AI Act this month",    params={        "search_limit": 5,        "fetch_page_content": True,        "return_format": "markdown",        "tbs": "qdr:m",  # past month only    },) # The fetched pages become the model's contextcontext = "\n\n".join(p["content"] for p in pages)
```

```
curl -X POST https://api.spider.cloud/search \  -H "Authorization: Bearer $SPIDER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "search": "what changed in the EU AI Act this month",    "search_limit": 5,    "fetch_page_content": true,    "return_format": "markdown",    "tbs": "qdr:m"  }'
```

```
import { Spider } from "@spider-cloud/spider-client"; const client = new Spider(); // The user's question is the search queryconst pages = await client.search("what changed in the EU AI Act this month", {  search_limit: 5,  fetch_page_content: true,  return_format: "markdown",  tbs: "qdr:m",}); // The fetched pages become the model's contextconst context = pages.map((p) => p.content).join("\n\n");
```

## The parameters you will set.

[Worked examples](/docs/core/realtime-search/)

- fetch_page_content

  Off by default, and you get the ranked list. On, Spider fetches each result and returns page objects.

- num

  How many results to ask the search for. Default 10.

- search_limit

  A cap on the results that come back. With page fetching on, it also caps how many pages Spider reads.

- return_format

  The format of a fetched page: markdown, text, raw HTML and the rest of the formats crawl and scrape take.

- limit

  Pages read per result site. Default 1. Raise it to go deeper than the page that ranked.

- tbs

  Time window, qdr:h through qdr:y. Past hour, day, week, month or year.

- country, location, language

  Results as a user in that region sees them. location takes a city, like "San Diego, CA".

- metadata

  Adds each fetched page's title, description and keywords beside its content.

- page, auto_pagination

  page asks for a later page of results. auto_pagination pages through until it reaches the count you asked for, and costs more.

Post an array of query objects and each search runs on its own in the same call. Ask for JSONL on a single search and pages arrive as each one finishes. A batch does not stream.

## Or let a model write the query.

`POST /ai/search` takes a plain prompt, writes the search, and returns structured results in each page's metadata.

Leave `search` off and the prompt becomes the query. The results land in `metadata.extracted_data` on each page. The fields are in the [AI Studio docs](https://spider.cloud/docs/ai-studio/).

## Questions.

What does it cost?

A search is $0.001, which is 10 credits at $1 per 10,000. With page fetching on, each page is metered on top like any scraped page, and its price is on the costs field of the page object. An attempt bills for the bandwidth and compute it used, whatever status the page returns. A failed page is not free. The full rate card is on the pricing page.

When are links enough, and when should I fetch the pages?

Links are enough when you track rankings, monitor a topic, or let a model choose what to read from titles and descriptions. Fetch the pages when the answer has to come from the text itself, as it does in RAG.

Do fetched pages keep the search title and description?

No. With fetch_page_content on, the response is a list of page objects in place of the result list. Turn on metadata to get each page's own title and description beside its content.

What about JavaScript-heavy results?

Results that need a browser get one. Spider renders the page before extracting, so client-side content shows up in the markdown like everything else.

How fast is it?

Run the search near the top of this page. It calls the production endpoint and the timer beside the results is real, so the number you get is your own.

Will it scale?

Pay as you go starts at 10,000 requests per minute and rises through four levels to 80,000 as the account uses more. Post an array of query objects to run several searches in one call, or ask for JSONL on a single search to read pages as each one finishes.

## Start with one search.

Get a key and send a query. Turn on page fetching when you need the text.

[Get an API key](/register/) [Search API docs](/docs/api/search/)
