Watches
POST /darkcrawl/v1/watches
Copy page
Create a watch: words to look for in new pages, and the channels to tell.
POST /
Authentication: your key as a bearer token.
Body
| Field | Type | Required | Default |
|---|---|---|---|
name | string | Required | |
terms | object[] | Required | |
terms[]. | string Values: phrase, domain, email, pattern | Required | |
terms[]. | string | Required | |
channelIds | string[] | Optional |
Request
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"]}'import os
import requests
resp = requests.post(
"https://api.darkcrawl.dev/darkcrawl/v1/watches",
headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
json={
"name": "Acme Example Ltd",
"terms": [
{
"kind": "phrase",
"value": "Acme Example Ltd",
},
{
"kind": "domain",
"value": "acme.example",
},
],
"channelIds": ["01K0EXAMPLECHANNEL0000000A"],
},
timeout=330,
)
print(resp.json())const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/watches", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Acme Example Ltd",
"terms": [
{
"kind": "phrase",
"value": "Acme Example Ltd"
},
{
"kind": "domain",
"value": "acme.example"
}
],
"channelIds": [
"01K0EXAMPLECHANNEL0000000A"
]
}),
signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());Response
Status 201.
{
"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
| Code | Status |
|---|---|
BAD_REQUEST | 400 |
NOT_FOUND | 404 |
QUOTA_EXCEEDED | 402 |
BLOCKLIST_UNAVAILABLE | 503 |
What each code means, and what to do about it: Errors.
Notes
- The reply is
201with the watch.backfillshows the one check of the pages already stored:pendinguntil it starts, thenrunning, thendone(orfailed). Its hits are markedbackfill: trueand raise no alert. - A term is
{kind, value}.phraseis a run of words, matched whatever its case.domainis a DNS name and also matches its subdomains.emailislocal@domain, or@domainfor any address there.patternis an RE2 regular expression. - A term that is refused answers
400 BAD_REQUESTand names its place, such asterms[2], never its value. A term that names a blocked onion is refused too. - Every
channelIdsentry must be one of your alert channels, else404 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, withdetailsof{"limit": "watches", "max": ...}. A watch costs no pages. See Rate limits.