Skip to content

Watches

POST /darkcrawl/v1/watches

Copy page

Create a watch: words to look for in new pages, and the channels to tell.

POST /darkcrawl/v1/watches

Authentication: your key as a bearer token.

Body

FieldTypeRequiredDefault
namestringRequired
termsobject[]Required
terms[].kindstring Values: phrase, domain, email, patternRequired
terms[].valuestringRequired
channelIdsstring[]Optional

Request

bash
curl -X POST https://api.darkcrawl.dev/darkcrawl/v1/watches \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme Example Ltd","terms":[{"kind":"phrase","value":"Acme Example Ltd"},{"kind":"domain","value":"acme.example"}],"channelIds":["01K0EXAMPLECHANNEL0000000A"]}'

Response

Status 201.

Response
{
  "id": "01K0EXAMPLEWATCH00000000A0",
  "name": "Acme Example Ltd",
  "state": "active",
  "terms": [
    {
      "kind": "phrase",
      "value": "Acme Example Ltd"
    },
    {
      "kind": "domain",
      "value": "acme.example"
    }
  ],
  "channelIds": [
    "01K0EXAMPLECHANNEL0000000A"
  ],
  "backfill": {
    "state": "pending",
    "scanned": 0,
    "hits": 0
  },
  "createdAt": "2026-11-26T10:00:00+00:00",
  "updatedAt": "2026-11-26T10:00:00+00:00"
}

Errors

CodeStatus
BAD_REQUEST400
NOT_FOUND404
QUOTA_EXCEEDED402
BLOCKLIST_UNAVAILABLE503

What each code means, and what to do about it: Errors.

Notes

  • The reply is 201 with the watch. backfill shows the one check of the pages already stored: pending until it starts, then running, then done (or failed). Its hits are marked backfill: true and raise no alert.
  • A term is {kind, value}. phrase is a run of words, matched whatever its case. domain is a DNS name and also matches its subdomains. email is local@domain, or @domain for any address there. pattern is an RE2 regular expression.
  • A term that is refused answers 400 BAD_REQUEST and names its place, such as terms[2], never its value. A term that names a blocked onion is refused too.
  • Every channelIds entry must be one of your alert channels, else 404 NOT_FOUND. A watch with no channels records hits and sends nothing.
  • A company can keep as many watches as its plan allows. At the limit the call is 402 QUOTA_EXCEEDED, with details of {"limit": "watches", "max": ...}. A watch costs no pages. See Rate limits.