Skip to content

API crawls

A crawl is the stored map of an application’s pages and controls. Tickets and ticket runs belong to a crawl, so a script usually starts here. The commands assume the variables from Tickets and ticket runs:

Terminal window
export INSIGHTJET_API_KEY="<your key>"
BASE=https://insightjet.ai/api/v1
Terminal window
curl "$BASE/crawls?status=completed&limit=5" -H "Authorization: Bearer $INSIGHTJET_API_KEY"
[
{
"id": 42,
"url": "https://shop.example.com/",
"name": null,
"status": "completed",
"startedAt": "2026-11-29T08:00:00.000Z",
"completedAt": "2026-11-29T08:14:31.000Z",
"duration": 871,
"nodeCount": 23,
"totalComponents": 410,
"totalScreenshots": 23
}
]

The crawls you made, newest first. The answer is the array itself. limit is 1 to 100 (20 by default); status is one of started, running, completed, failed or stopped. duration is in seconds and nodeCount is the number of pages (states) found.

Expected result: status 200 and an array, empty if you have no crawl yet.

Terminal window
curl "$BASE/crawls/42" -H "Authorization: Bearer $INSIGHTJET_API_KEY"

The same fields, plus edgeCount, testCaseCount, errorMessage, analysisConfig and insightjetLink (a link to the crawl in InsightJet, absent when none can be made). analysisConfig holds the crawl’s saved settings by allowed name only. A crawl’s saved login is never returned, and no request in this API takes an application login.

A crawl that is not yours, or does not exist, is 404 not_found.

Expected result: status 200 and the crawl’s counts.

Terminal window
curl -X POST "$BASE/crawls" \
-H "Authorization: Bearer $INSIGHTJET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://shop.example.com/", "publicPagesOnly": true}'
{
"status": "started",
"crawlId": 43,
"url": "https://shop.example.com/",
"signedIn": false,
"insightjetLink": "https://insightjet.ai/..."
}

The body has url (up to 2,048 characters, with http:// or https://) and two optional flags. No other field is accepted.

  • publicPagesOnly: true crawls signed out, and never needs a sign-in.
  • signIn: true asks for a sign-in even when InsightJet already keeps one.
  • The two cannot both be true (400 invalid_request).
  • An address with a login in it (https://user:password@host/) is refused with 400 address_has_login.

A start follows the same limits as the Learn button: agent-hours, agents at the same time, the number of applications the plan includes, and one crawl of an application at a time. It has no daily cap of its own. The answer comes at once, and Location is /api/v1/crawls/43; read that address to follow the crawl. signedIn says whether the crawl runs signed in.

Expected result: status 202, status: "started" and a crawlId.

A script cannot open the sign-in screen. When the application is new to InsightJet, its saved sign-in stopped working, or you sent signIn: true, nothing is started and the answer is 409:

{
"error": {
"code": "needs_sign_in",
"message": "Nothing was started. The application's person signs in on the page at details.signInLink, and the crawl then starts by itself. The link works for 15 minutes, starts one crawl, and opens only for the InsightJet account this key belongs to.",
"details": {
"why": "new_application",
"signInLink": "https://insightjet.ai/connect-app#t=...",
"expiresAt": "2026-11-30T10:20:00.000Z"
}
}
}
  • why is asked (you sent signIn: true), new_application, or sign_in_lost (the saved sign-in stopped working).
  • signInLink is a one-time link, valid for 15 minutes (expiresAt), for one crawl, and it opens only for the InsightJet account the key belongs to, signed in to InsightJet. The person signs in to their application on that page, and the crawl then starts by itself.
  • InsightJet does not send the link by email; your script has to hand it to the person. The sign-in secret is in the part of the address after the #, so keep the whole link out of logs.

Expected result: status 409 and details.signInLink; no crawl exists yet. To crawl the public pages without anyone signing in, send publicPagesOnly: true instead.

409 crawl_running (a crawl of this application is already running; details.crawlId), 402 out_of_hours and 402 application_limit (a plan change is needed; details.planLink), 429 all_agents_working, 403 team_blocked, and 400 invalid_address. Every code is on Errors and limits.