# SearchWebCode API reference

> SearchWebCode searches the source code of web pages across many domains. The API runs the same searches as the website: boolean, phrase, literal and regex queries, optionally limited to a top-level domain. An investigator can use it to find sites that share a tracking ID, a snippet or a string in…

Source: https://osinttools.io/apis/searchwebcode/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/searchwebcode/

- Base URL: https://www.searchwebcode.com
- Authentication: Bearer token in the `Authorization` header. Create a key on the account page.
- Pricing: Credits
- Rate limits: Daily search-request caps shared with the website, reset at midnight UTC: 500 for Research, 3,000 for Pro. A 429 means a throughput or daily cap; honor Retry-After.
- Vendor docs: https://www.searchwebcode.com/docs

## Overview

SearchWebCode searches the source code of web pages across many domains. The API runs the same searches as the website: boolean, phrase, literal and regex queries, optionally limited to a top-level domain. An investigator can use it to find sites that share a tracking ID, a snippet or a string in their HTML.

Every call sends `Authorization: Bearer <key>`; keys are created on the account page. A key spends the account's balance, and a lost key cannot be recovered. Search results are paged with `limit` and `offset`; bulk results come from a streaming export or an export job.

Search requests also count against daily caps shared with the website (500 for Research, 3,000 for Pro). Only one export job can run per account at a time. Query syntax is described at [the syntax page](https://www.searchwebcode.com/syntax).

## Errors

| Status | Meaning |
| --- | --- |
| 400 | Bad query |
| 401 | Bad key |
| 402 | Insufficient allowance or balance |
| 429 | Throughput or daily rate limit exceeded |
| 502 | Temporary server error; retry |
| 503 | Temporary server error; retry |

## Search

### Search page source code and return matching domains with snippets.

`GET /api/v1/search`

- Takes: Domain
- Footprint: passive (the target is not contacted)
- Cost: One search credit covers a query plus 25 more requests; 5 cents from prepaid credit on pay-as-you-go. `counts_only` uses
- Plan: Paid plan or prepaid balance

Also accepts POST with the same parameters. `regex` cannot be combined with `ignore_case`; `ignore_case` works on plain queries only. A missing `next_offset` means the result set is exhausted. `count_kind` is exact, estimated or partial.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | yes | Query: boolean, phrase or literal syntax Example: UA-0000000-1 |
| `regex` | query | boolean | no | Treat the query as a regular expression Example: false |
| `ignore_case` | query | boolean | no | Case-insensitive match; plain queries only Example: false |
| `tld` | query | string | no | Limit to a top-level domain Example: com |
| `limit` | query | integer | no | Results per page, 1 to 256 (larger values are clamped) Example: 100 |
| `offset` | query | integer | no | Offset; pass next_offset from the previous response Example: 0 |
| `counts_only` | query | boolean | no | Return only the count, no results Example: false |

Response fields:

- `count_kind` (string): exact, estimated or partial
- `total` (integer): Total matches
- `verified_hits` (integer): Hits verified in this response
- `next_offset` (integer): Offset for the next page; absent when exhausted
- `match_mode` (string): How the query was matched
- `results[].domain` (string): Matching domain
- `results[].url` (string): Matching page URL
- `results[].tld` (string): Top-level domain
- `results[].rank` (integer): Rank of the domain
- `results[].occurrences` (integer): Number of occurrences
- `results[].snippet` (object): Matching snippet of the source
- `charged_cents` (integer): Amount charged for this call, in cents
- `balance_cents` (integer): Remaining balance, in cents

```bash
curl 'https://www.searchwebcode.com/api/v1/search?q=UA-0000000-1' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "count_kind": "estimated",
  "total": 1200,
  "verified_hits": 1,
  "next_offset": 256,
  "match_mode": "substring",
  "results": [
    {
      "domain": "example.com",
      "url": "https://example.com/",
      "tld": "com",
      "rank": 1,
      "occurrences": 2,
      "snippet": {}
    }
  ],
  "charged_cents": 5,
  "balance_cents": 1495
}
```

## Export

### Stream search results as CSV or JSON Lines.

`GET /api/v1/export`

- Takes: Domain
- Footprint: passive (the target is not contacted)
- Cost: One search credit per block of 26 requests
- Plan: Paid plan or prepaid balance

Takes the search parameters plus `rows`, `offset`, `format` and `snippets`. JSON Lines ends with a line carrying `complete`, `stopped_by` and `next_offset` so a caller can resume; CSV callers must check completeness themselves.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | yes | Query, same syntax as search Example: UA-0000000-1 |
| `tld` | query | string | no | Limit to a top-level domain Example: com |
| `rows` | query | integer | no | Rows to return, up to 100,000 Example: 10000 |
| `offset` | query | integer | no | Row offset for resuming Example: 0 |
| `format` | query | string | no | Output format Example: jsonl One of: jsonl |
| `snippets` | query | string | no | Set to 0 to leave snippets out Example: 0 |

Response fields:

- `domain` (string): Matching domain (one JSON object per line)
- `complete` (boolean): On the final line: whether the export finished
- `stopped_by` (string): On the final line: why the export stopped
- `next_offset` (integer): On the final line: offset to resume from

```bash
curl 'https://www.searchwebcode.com/api/v1/export?q=UA-0000000-1' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "complete": true,
  "stopped_by": "rows",
  "next_offset": 10000
}
```

## Export jobs

### Start an export job, or request a price quote for one.

`POST /api/v1/exports`

- Takes: Domain
- Footprint: passive (the target is not contacted)
- Cost: $10 per million rows in fast mode, $20 per million when verified, rounded up to cents per job
- Plan: Paid plan or prepaid balance

Send `op: "quote"` to get `maximum_charge_cents` and `within_spend_limit`; repeat the POST without `op` to confirm. A started job returns 202. One job can run per account at a time.

Response fields:

- `id` (string): Job id
- `status` (string): Job status, for example queued
- `mode` (string): fast or verified

```bash
curl -X POST 'https://www.searchwebcode.com/api/v1/exports' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"q":"UA-0000000-1","tld":"com","max_rows":100000,"max_cost_cents":500,"mode":"fast"}'
```

Example response (202):

```json
{
  "id": "job_example123",
  "status": "queued",
  "mode": "fast"
}
```

### Get the status of an export job.

`GET /api/v1/exports`

- Footprint: passive (the target is not contacted)
- Plan: Any plan

When the job is done the response carries a download URL. Download links last seven days. Fast-mode files may include a `precision_sample`.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | string | yes | Export job id Example: job_example123 |

Response fields:

- `status` (string): Job status
- `rows` (integer): Rows exported
- `download_url` (string): Link to the file once done
- `url_expires_at` (string): When the download link expires

```bash
curl 'https://www.searchwebcode.com/api/v1/exports?id=job_example123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "status": "done",
  "rows": 100000,
  "download_url": "https://example.com/download/job_example123",
  "url_expires_at": "2026-12-06T00:00:00Z"
}
```

### Cancel an export job; rows already collected are kept.

`DELETE /api/v1/exports`

- Footprint: passive (the target is not contacted)
- Plan: Any plan

Stops the job and keeps the rows collected so far. The docs show no response body for this call; the example is made up.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | query | string | yes | Export job id Example: job_example123 |

Response fields:

- `status` (string): Job status after cancelling

```bash
curl -X DELETE 'https://www.searchwebcode.com/api/v1/exports?id=job_example123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "status": "cancelled"
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
