# Filter by domain

Validate hostnames before dispatch and check the complete fallback chain.

Canonical: https://searchsdk.dev/docs/guides/domain-filters
Markdown: https://searchsdk.dev/docs/guides/domain-filters.md

<a id="request-hostnames"></a>

## Request hostnames

> **TypeScript reference**
> The API names, code and policy behavior in this article describe the TypeScript SDK. See [your language guide](https://searchsdk.dev/docs/sdks) for its supported surface and limits.

**filter.ts · fixture**

```typescript
import { createSearch } from '@belweave/search-sdk';
import { createMockProvider } from '@belweave/search-sdk/testing';

const client = createSearch({ provider: createMockProvider() });
const response = await client.web.search({
  query: 'search API reference',
  limit: 3,
  includeDomains: ['example.org'],
  excludeDomains: ['excluded.example.org'],
});

console.log(response.results); // Mock hostname filtering; no live search
```

Use ASCII hostnames or punycode. Schemes, paths, ports, wildcards, and empty lists are rejected. The SDK lowercases and deduplicates hosts. The same normalized host cannot appear in both lists.

<a id="capacity"></a>

## Check provider capacity

| Adapter | Include / exclude capacity |
| --- | --- |
| Valyu | 100 / 100 under SDK policy; web only |
| Context.dev | 100 / 100 |
| TinyFish | 100 / 100 — conservative SDK policy |
| Exa | 1,200 / 1,200 |
| Tavily | 300 / 150 |
| Perplexity | 20 include or 20 exclude; mutually exclusive |
| Parallel | 200 include or 200 exclude; mutually exclusive SDK policy |
| Linkup | 100 / 50 under SDK policy |
| Firecrawl | 100 include or 100 exclude; mutually exclusive SDK policy |
| You.com | 500 include or 5,000 exclude; mutually exclusive |
| Brave / Serper / SerpAPI / SearXNG | Neither filter supported by these normalized adapters |

Every provider in a configured fallback chain must support the requested filters and capacity before any network dispatch. A Brave fallback makes a filtered request unsupported even when the primary supports it. A provider declaring mutuallyExclusiveDomainFilters rejects simultaneous lists before dispatch.

<a id="matching"></a>

## Keep matching semantics explicit

Built-in adapters forward native filter options. They do not rewrite the query into `site:` operators or remove provider results locally. Root-domain and subdomain behavior remains provider-specific; do not infer exact-host matching from the SDK's hostname syntax.

- [Request validation reference](https://searchsdk.dev/docs/api/search)
- [Provider capability reference](https://searchsdk.dev/docs/api/providers)
