# URL Content

The `url_content` tool is a **built-in tool** automatically available on all `/v1/chat/completions` requests. It uses **Google Gemini 2.5 Flash** with the native `urlContext` tool to fetch, render, and analyze live web pages. The model receives the full rendered page content and answers your question about it.

#### How It Works

1. You include one or more URLs anywhere in your message
2. The LLM detects URLs and calls `url_content` internally with those URLs + your question
3. Gemini 2.5 Flash fetches and processes the full page content using Google's `urlContext` tool
4. Gemini returns an answer grounded in the actual page content
5. The answer is returned as a standard chat completion

#### Use Cases & Examples

#### 1. Summarize a Page

```json
{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "Summarize this page and also team details: https://www.qolaba.ai/about-us"
    }
  ]
}

```

#### 2. Extract Specific Information

```json
{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "What are the pricing plans listed on https://www.qolaba.ai/pricing?"
    }
  ]
}

```

#### 3. Compare Two Pages (Multi-URL)

```json
{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "Compare these two pages and tell me the key differences:\nhttps://openai.com\nhttps://anthropic.com"
    }
  ]
}

```

#### 4. Extract Structured Data from a Page

```json
{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "List all team members and their roles from https://www.qolaba.ai/about-us as a JSON array"
    }
  ]
}

```

#### 5. Competitor Analysis (3+ URLs)

```json
{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "Compare the features and positioning of these three AI platforms:\nhttps://openai.com\nhttps://anthropic.com\nhttps://www.qolaba.ai"
    }
  ]
}

```

### Tips & Best Practices

| Tip                    | Details                                                                          |
| ---------------------- | -------------------------------------------------------------------------------- |
| **Just paste the URL** | No special syntax — include the URL anywhere in the message                      |
| **Be specific**        | "Extract all product names" works better than "tell me about this page"          |
| **Multiple URLs**      | Put each URL on its own line for clarity — all are fetched together              |
| **JS-heavy pages**     | Works on SPAs and dynamic pages — Gemini's urlContext renders JavaScript         |
| **Large pages**        | Cost scales with page size but remains low (Gemini 2.5 Flash is cheap per token) |
| **Ask for format**     | "Return as JSON", "Return as a table", "List as bullet points" all work          |

***

### Limitations

* **Private/authenticated pages** — cannot access pages behind login walls or paywalls
* **PDFs / binary files** — works best on HTML pages; PDF support depends on Google's urlContext
* **Rate-limited sites** — some sites block scraping; Gemini makes a best-effort attempt
* **Very large pages** — extremely long pages may be truncated by token limits
* **No config from request** — `urls` and `prompt` are extracted by the model; you cannot pass them directly in the request body

<br>
