> SpecStream is the live web data engine for teams and agents. This is the Markdown copy of https://specstream.ai/docs/integrations/render. Every page, with what SpecStream does and costs: https://specstream.ai/llms.txt

# Render

Give any Render service live web search and page reading. Store your SpecStream API key as an environment variable on the service, and your code calls the Search API and the Extract API over HTTPS, in any language Render runs.

[SpecStream for Render, API & cloud platforms](https://specstream.ai/integrations/render.md)

## What you need

-   A Render web service, private service, background worker or cron job.
-   A SpecStream account. New accounts start with $10 of credit, no card. [Create one](https://specstream.ai/signup?utm_source=render).
-   A SpecStream API key with a spending limit, which step 1 creates.

1.  1

    ## 1. Create an API key

    In your SpecStream workspace, open **Agents & API**, choose **API keys**, then **Create API key**. Turn on **Authorize paid work**: a key without it can't search or read pages. Set a **Total spending limit** above $0, because that limit is what caps the spending of everything that uses the key.

    Copy the key when it's shown. It isn't shown again.

2.  2

    ## 2. Add the key to your service

    In the [Render Dashboard (opens in a new tab)](https://dashboard.render.com/), select your service and click **Environment** in the left pane. Under **Environment Variables**, click **\+ Add Environment Variable**. Enter `SPECSTREAM_API_KEY` as the **Key** and paste your SpecStream key as the **Value**.

    Save with **Save, rebuild, and deploy** or **Save and deploy**. With **Save only**, the service reads the key at its next deploy. To share one key across several services, put it in an **Environment Group** and link the group to each service.

3.  3

    ## 3. Or declare it in render.yaml

    If you deploy from a Blueprint, declare the variable with `sync: false`. Render asks for its value in the Dashboard when you create the Blueprint, so the key never goes into your repository:

    render.yaml

    ```yaml
    services:
      - type: web
        name: my-app
        runtime: node
        buildCommand: npm install
        startCommand: node server.js
        envVars:
          - key: SPECSTREAM_API_KEY
            sync: false
    ```

4.  4

    ## 4. Search from your code

    Send the question in `q`, in everyday words, with the key as a Bearer token. The reply's `data.answer.value` holds a short answer when the pages give one, and `data.sources` lists each page with its `title`, `url` and `snippet`:

    server.js

    ```javascript
    const q = "Which regions does Render offer for web services?";
    const res = await fetch(
      `https://api.specstream.ai/v1/web-search?q=${encodeURIComponent(q)}`,
      { headers: { Authorization: `Bearer ${process.env.SPECSTREAM_API_KEY}` } },
    );
    if (!res.ok) throw new Error(`SpecStream answered ${res.status}`);
    const { data } = await res.json();
    console.log(data.answer?.value);
    for (const source of data.sources) console.log(source.title, source.url);
    ```

5.  5

    ## 5. Read the pages you need

    `POST /v1/extract` returns the main text of 1 to 20 pages or documents in one call. Each item of `data.results` has the page's `url`, a `status`, and its `text` when the status is `ok`. In Python, with `requests`:

    worker.py

    ```python
    import os
    
    import requests
    
    res = requests.post(
        "https://api.specstream.ai/v1/extract",
        headers={"Authorization": f"Bearer {os.environ['SPECSTREAM_API_KEY']}"},
        json={"urls": ["https://render.com/docs/cronjobs"], "format": "markdown"},
        timeout=60,
    )
    res.raise_for_status()
    for page in res.json()["data"]["results"]:
        if page["status"] == "ok":
            print(page["url"], page["text"][:500])
    ```

## Run a search on a schedule

Create a **Cron Job** in the Render Dashboard with a schedule such as `0 12 * * *` (every day at noon UTC) and a command that runs your script, then add `SPECSTREAM_API_KEY` to its **Environment** as in step 2. Each run spends from the same balance, and the key's spending limit is the ceiling for all of them.

## An agent on Render

If your service runs an agent with an MCP client, connect it to `https://api.specstream.ai/mcp` over Streamable HTTP and send `Authorization: Bearer` with the value of `SPECSTREAM_API_KEY`. The agent gets these tools:

| Tool | What it does | Cost |
| --- | --- | --- |
| `search_web` | Searches the live web with `{"q": "<the question>"}` and returns up to 10 results, each with its page. | $5 per 1,000 searches |
| `read_pages` | Returns the main text of 1 to 20 pages or documents (PDF, Word, Excel), read live, or from SpecStream's own dated copy when a page is slow or refuses, with `{"urls": [...]}`. | $0.80 per 1,000 pages |
| `compile`, `quote_capacity_work`, `authorize_capacity_work` | Deep Search: reads a request in plain words, prices it, and starts it after a maximum is approved. Rows come back with `list_find_rows`. | 5¢, 15¢ or $1 a delivered row, plus 5¢ for a person's email and 15¢ for a phone |

## Errors

-   `401`: the key is missing or wrong. Send it as `Authorization: Bearer <key>`.
-   `403`: the key has no **Authorize paid work**, or the call would go over the key's spending limit.
-   `402`: the balance is empty, or the call would go over the account's monthly spending limit.
-   `503` with `Retry-After`: wait that many seconds and send it again.

## Cost

A search is $5 per 1,000 searches of up to 10 results, or $1 per 1,000 with `speed=fast`. A page read is $0.80 per 1,000 pages. Neither needs a quote or an approval, so they come out of your balance up to the key's spending limit. Render bills the service itself as usual. [Balance, quotes, and billing](https://specstream.ai/docs/billing.md) has the details.

## Remove

Delete `SPECSTREAM_API_KEY` on the service's **Environment** page and deploy again. To stop the key working everywhere, revoke it under **API keys** in **Agents & API**. Results already delivered stay in your workspace. Questions go to [support@specstream.ai](mailto:support@specstream.ai).

## More

[SpecStream for Render](https://specstream.ai/integrations/render.md) covers what it does in Render on one page. Every other tool has its guide in [Connect your tools](https://specstream.ai/docs/integrations.md). You see the most a request can cost before it starts, and the matches are paid from your balance. [Billing](https://specstream.ai/docs/billing.md) has the details. For help, email [support@specstream.ai](mailto:support@specstream.ai).
