# Search

This quickstart walks you through generating your first search with Infron.

### Tavily

{% tabs %}
{% tab title="Tavily-Search-SDK" %}

```python
from tavily import TavilyClient

tavily_client = TavilyClient(
    api_key="<API_KEY>",
    api_base_url="https://search.onerouter.pro/v1/tavily"
)
response = tavily_client.search("Who is Leo Messi?")

print(response)
```

{% endtab %}
{% endtabs %}

### Jina

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests

response = requests.post(
    "https://search.onerouter.pro/v1/chat/completions",
    headers={"Authorization":"text","Content-Type":"application/json"},
    data=json.dumps({
      "model": "jina-deepsearch-v1",
      "messages": [
        {
          "role": "user",
          "content": "Hi!"
        },
        {
          "role": "assistant",
          "content": "Hi, how can I help you?"
        },
        {
          "role": "user",
          "content": "what's the latest blog post from jina ai?"
        }
      ],
      "stream": True
    })
)

data = response.json()
```

{% endtab %}
{% endtabs %}

### Firecrawl

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests

response = requests.post(
    "https://search.onerouter.pro/v1/firecrawl",
    headers={"Authorization":"text","Content-Type":"application/json"},
    data=json.dumps({
      "model": "firecrawl-search",
      "query": "who is Leo Messi?",
    })
)

data = response.json()
```

{% endtab %}
{% endtabs %}

### Perplexity

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests

response = requests.post(
    "https://search.onerouter.pro/v1/perplexity",
    headers={"Authorization":"text","Content-Type":"application/json"},
    data=json.dumps({
      "model": "perplexity-search",
      "query": "latest AI developments 2024",
      "max_results": 10,
      "search_domain_filter": [
        "science.org",
        "pnas.org",
        "cell.com"
      ],
      "max_tokens_per_page": 1024,
      "country": "US",
      "search_recency_filter": "week",
      "search_after_date": "10/15/2025",
      "search_before_date": "10/16/2025"
    })
)

data = response.json()
```

{% endtab %}
{% endtabs %}

### Exa

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests

response = requests.post(
    "https://search.onerouter.pro/v1/exa",
    headers={"Authorization":"text","Content-Type":"application/json"},
    data=json.dumps({
      "model": "exa-search",
      "query": "Latest research in LLMs",
      "additionalQueries": [
        "LLM advancements",
        "large language model progress"
      ],
      "type": "auto",
      "category": "news",
      "userLocation": "US",
      "numResults": 100,
      "excludeDomains": [
        "baidu.com"
      ],
      "startCrawlDate": "2023-01-01T00:00:00.000Z",
      "endCrawlDate": "2023-12-31T00:00:00.000Z",
      "startPublishedDate": "2023-01-01T00:00:00.000Z",
      "endPublishedDate": "2023-12-31T00:00:00.000Z",
      "includeText": [
        "large language model"
      ],
      "excludeText": [
        "course"
      ],
      "context": True,
      "moderation": False
    })
)

data = response.json()
```

{% endtab %}
{% endtabs %}

### Cloudsway

{% tabs %}
{% tab title="Python" %}

```python
import json
import requests

response = requests.post(
    "https://search.onerouter.pro/v1/cloudsway",
    headers={"Authorization":"text","Content-Type":"application/json"},
    data=json.dumps({
      "model": "cloudsway-smart-search",
      "q": "Latest research in LLMs",
      "count": 10,
      "offset": 0,
      "freshness": "Month",
      "sites": "baidu.com, google.com",
      "enableContent": True,
      "contentType": "TEXT",
      "contentTimeout": 3,
      "mainText": False
    })
)

data = response.json()
```

{% endtab %}
{% endtabs %}

### Next steps

{% content-ref url="/spaces/hxFf4d69JwgF5K3uZuiz/pages/UwADHoicsh5VqKzixbsD" %}
[Overview](/docs/search-apis/overview.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infronai.gitbook.io/docs/overview/quickstart/search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
