# Tavily Extract's Python client against SpecStream

Date: 2026-11-10. Client: tavily-python 0.8.5.

## The one line a user changes

Before:

```
TavilyClient(api_key="tvly-...")
```

After:

```
TavilyClient(api_key=KEY, api_base_url="https://api.specstream.ai/tavily")
```

The same address serves Tavily's search. A call past the account's limit answers 432, which the client raises as ForbiddenError.

## Request parameters

Honoured means the check in the Measured column passed on the reply. Accepted, not applied means status 200 and the reply has the form of the same call without the parameter. Refused means the vendor's error body and status.

Counts: 4 honoured, 7 accepted, not applied, 3 refused.

| Parameter | Sent | Verdict | Measured |
|---|---|---|---|
| `urls (one string)` | `https://en.wikipedia.org/wiki/Web_scraping` | honoured | status 200; results[0] is the page with its raw_content |
| `urls (a list)` | 3 URLs, one host that does not resolve | honoured | status 200; results 2, failed_results 1 |
| `format` | `text` | honoured | status 200; raw_content has no markdown marks, unlike the baseline |
| `format` | `markdown` | honoured | status 200; raw_content has markdown marks |
| `timeout` | `45` | accepted, not applied | status 200; reply has the baseline's form |
| `extract_depth` | `advanced` | accepted, not applied | status 200; reply has the baseline's form |
| `include_images` | `true` | accepted, not applied | status 200; reply has the baseline's form |
| `include_favicon` | `true` | accepted, not applied | status 200; reply has the baseline's form |
| `include_usage` | `true` | accepted, not applied | status 200; reply has the baseline's form |
| `query` | `history of scraping` | accepted, not applied | status 200; reply has the baseline's form |
| `chunks_per_source` | `2` with a query | accepted, not applied | status 200; reply has the baseline's form |
| `urls (21 URLs)` | 21 URLs | refused | status 400; BadRequestError |
| `urls (empty list)` | `[]` | refused | status 400; BadRequestError |
| `api key (wrong key)` | a key that is not one | refused | status 401; InvalidAPIKeyError |

## Response fields

Present means the field holds a value in the replies to the calls above. Empty means it is there with no value. Absent means it is not in the reply.

Counts: 8 present, 0 empty, 3 absent.

| Field | State | Measured |
|---|---|---|
| `results` | present | every 200 reply |
| `failed_results` | present | every 200 reply |
| `response_time` | present | every 200 reply |
| `request_id` | present | every 200 reply |
| `usage` | absent | every 200 reply |
| `results[].url` | present | every result |
| `results[].raw_content` | present | every result |
| `results[].images` | absent | every result |
| `results[].favicon` | absent | every result |
| `failed_results[].url` | present | the unresolvable host |
| `failed_results[].error` | present | the unresolvable host |
