Skip to content
OSINTtools.io

SearchWebCode API

Source-code search across more than 131 million homepages, by exact string or regex, with the matched HTML shown.

Base URL
https://www.searchwebcode.com
Sign-in
Bearer token
Pricing
Credits
Format
REST, Bulk files
Endpoints
5

Compiled by OSINTtools.io editors from searchwebcode.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

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.

Quick start

  1. Get a key

    Create an account with SearchWebCode and copy your bearer token. Where to get it

  2. Make your first request

    Search page source code and return matching domains with snippets.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

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

    A 200 response looks like this.

    {
      "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
    }

Authentication

Send your token in the Authorization header as Bearer YOUR_TOKEN.

Create a key on the account page.

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

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.

Pricing: credits.

Errors

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

Export

  • Takes: Domain
  • 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.

Query parameters

qstringrequiredtakes your domain

Query, same syntax as search

Example: UA-0000000-1
tldstring

Limit to a top-level domain

Example: com
rowsinteger

Rows to return, up to 100,000

Example: 10000Default: 10000
offsetinteger

Row offset for resuming

Example: 0
formatstring

Output format

Example: jsonlOne of: jsonl
snippetsstring

Set to 0 to leave snippets out

Example: 0
Response fields · 4Show

domainstring

Matching domain (one JSON object per line)

completeboolean

On the final line: whether the export finished

stopped_bystring

On the final line: why the export stopped

next_offsetinteger

On the final line: offset to resume from

curl 'https://www.searchwebcode.com/api/v1/export?q=UA-0000000-1' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "complete": true,
  "stopped_by": "rows",
  "next_offset": 10000
}

Export jobs

  • Takes: Domain
  • 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.

Request body (JSON) · 8Show

qstringalways present

Query

regexboolean

Treat the query as a regular expression

ignore_caseboolean

Case-insensitive match

tldstring

Limit to a top-level domain

max_rowsinteger

Rows to export, default 1,000,000, at most 30,000,000

max_cost_centsintegeralways present

Spend limit in cents; required under current terms

modestring

fast (default) or verified

opstring

Set to quote to get a price quote instead of starting the job

Response fields · 3Show

idstring

Job id

statusstring

Job status, for example queued

modestring

fast or verified

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"}'
Replace YOUR_API_KEY with your key
Response
{
  "id": "job_example123",
  "status": "queued",
  "mode": "fast"
}
  • 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.

Query parameters

idstringrequired

Export job id

Example: job_example123
Response fields · 4Show

statusstring

Job status

rowsinteger

Rows exported

download_urlstring

Link to the file once done

url_expires_atstring

When the download link expires

curl 'https://www.searchwebcode.com/api/v1/exports?id=job_example123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "status": "done",
  "rows": 100000,
  "download_url": "https://example.com/download/job_example123",
  "url_expires_at": "2026-12-06T00:00:00Z"
}
  • 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.

Query parameters

idstringrequired

Export job id

Example: job_example123
Response fields · 1Show

statusstring

Job status after cancelling

curl -X DELETE 'https://www.searchwebcode.com/api/v1/exports?id=job_example123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "status": "cancelled"
}