> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TinySearch Tutorial

> Send your first TinySearch request and read the structured results

## Target

You'll send one search and get back ranked results as structured JSON: a title, snippet, and URL for each result.

```json Expected result theme={null}
{
  "query": "web automation tools",
  "results": [
    {
      "position": 1,
      "site_name": "tinyfish.ai",
      "title": "TinyFish — AI Web Automation Platform",
      "snippet": "Automate any website with natural language instructions...",
      "url": "https://tinyfish.ai"
    }
  ],
  "total_results": 10,
  "page": 0
}
```

> [!NOTE]
>
> TinySearch is free on the Hobby plan, up to 12,000 requests per day at up to 30 requests per minute. For higher limits, select the Builder plan in your wallet: it raises the rate limit to 150 requests per minute at \$0.005 per query. See [Rate Limits](https://docs.tinyfish.ai/tinysearch/reference#rate-limits) and [Billing](https://docs.tinyfish.ai/tinysearch/reference#billing).

## Steps to do

> [tab] Playground
>
> **1. Open the Search Playground**
>
> Sign in at [agent.tinyfish.ai](https://agent.tinyfish.ai), then click **Search** under **Playground** in the left sidebar. New to TinyFish? Create an account first by following the first steps of the [TinyAgent tutorial](https://docs.tinyfish.ai/tinyagent/tutorial.md).
>
> **2. Enter a query and search**
>
> Type `web automation tools` into **What do you want to find?**, then click **Search the web**.
>
> ![Search Playground with web automation tools typed into the query box and the Search the web button highlighted](https://mintcdn.com/tinyfish/UQ16BBiuqp_XHdCK/images/tinysearch-tutorial/01-search-query-filled.png?fit=max\&auto=format\&n=UQ16BBiuqp_XHdCK\&q=85\&s=ee64fa7606a71eb2b4c7af5b6ce6779f)
>
> Type your query, then click **Search the web**.
>
> **3. Read the results**
>
> The **Live preview** panel shows the request status, how many results came back, and how long the search took. Each result lists the site, title, URL, and a short snippet. Click **Run another search** to start over.
>
> ![Search Playground results showing a 200 OK status, the number of results, the response time, and the ranked results](https://mintcdn.com/tinyfish/UQ16BBiuqp_XHdCK/images/tinysearch-tutorial/02-search-results.png?fit=max\&auto=format\&n=UQ16BBiuqp_XHdCK\&q=85\&s=4da82d42998a34ab01c891012290c3d8)
>
> The status bar shows the response status, result count, and time taken.
>
> **4. See the JSON**
>
> Click the **JSON** tab to see the same response your code will receive. Use the copy button next to it to copy the full JSON.
>
> ![Search Playground JSON tab showing the response with query, results, position, site\_name, snippet, title, and url](https://mintcdn.com/tinyfish/UQ16BBiuqp_XHdCK/images/tinysearch-tutorial/03-search-json.png?fit=max\&auto=format\&n=UQ16BBiuqp_XHdCK\&q=85\&s=1512d794f12449f773b96ce69b2ee967)
>
> Click **JSON** to see the raw response.

> [tab] API
>
> **1. Get your API key**
>
> Visit [agent.tinyfish.ai/api-keys](https://agent.tinyfish.ai/api-keys) and create a key. Store it in your environment:
>
> ```bash theme={null}
> export TINYFISH_API_KEY="your_api_key_here"
> ```
>
> All requests send the key in the `X-API-Key` header. See [Authentication](https://docs.tinyfish.ai/authentication.md) for the full setup.
>
> **2. Send a search**
>
> ```python Python theme={null}
> from tinyfish import TinyFish
>
> client = TinyFish()
> response = client.search.query(query="web automation tools")
> for r in response.results:
>     print(r.title, "→", r.url)
> ```
>
> ```typescript TypeScript theme={null}
> import { TinyFish } from "@tiny-fish/sdk";
>
> const client = new TinyFish();
> const response = await client.search.query({ query: "web automation tools" });
> response.results.forEach((r) => console.log(r.title, "→", r.url));
> ```
>
> ```bash cURL theme={null}
> curl "https://api.search.tinyfish.ai?query=web+automation+tools" \
>   -H "X-API-Key: $TINYFISH_API_KEY"
> ```
>
> **3. Read the results**
>
> Each item in `results` has a `position`, the `site_name`, a `title`, a `snippet`, and the `url`. `total_results` is how many results came back, and `page` is the page number, starting at `0`.

## Next Steps

> [card] [How-to Guides](https://docs.tinyfish.ai/tinysearch/how-to)
>
> Filter by country, language, site, or date

> [card] [TinySearch Reference](https://docs.tinyfish.ai/tinysearch/reference)
>
> Every parameter and the full response schema

> [card] [What Success Looks Like](https://docs.tinyfish.ai/tinysearch/explanation/what-success-looks-like.md)
>
> What each field in a result means

> [card] [How Location and Language Resolve](https://docs.tinyfish.ai/tinysearch/explanation/how-location-language-resolve.md)
>
> What happens when you set only one of the two


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.