Skip to main content
The Link Extractor and Broken Link Checker run site crawls in the background. Start a job once, then use its ID to request progress until it finishes.

Endpoints

All paths use the base URL https://api.pocketutils.com. Replace {jobId} with the ID returned by the matching start endpoint. IDs belong to one tool and cannot be used with the other tool’s status endpoint.

The pattern

  1. Send a JSON body containing url to the start endpoint. Use an API key for an automated integration.
  2. Check for 202 Accepted and save data.jobId. Acceptance means a job was created; it does not mean the website has been successfully scanned.
  3. Poll the matching GET endpoint about every two seconds for one job. Known jobs return 200 OK with their current state.
  4. Inspect data.status on every response. Keep polling for nonterminal phases.
  5. On done, save data.result and stop. On error, read data.error and stop. On 404, the job is unavailable and further polling of that ID will not retrieve it.

Start request

202 Accepted

Status request

Polling costs 0 credits, but counts toward your requests-per-minute limit. Poll less frequently if you have multiple jobs or other API traffic. If you receive 429, respect Retry-After when present and reduce your request rate. Only crawl starts require Turnstile for website callers; API-key callers bypass Turnstile. Polling does not require a Turnstile token.

Response shape

The status response wraps the job snapshot in data: Optional fields are omitted until applicable. An HTTP 200 or success: true alone does not establish crawl success. Broken Link Checker uses pagesCrawled, linksChecked, and linksTotal in its progress object. Link Extractor uses pagesScanned and has no checking counters. Both expose phase, message, sitemapFound, sitemapUrlCount, pagesDiscovered, pagesCap, and linksFound. Full schemas and response examples are on each tool’s reference page. The Link Extractor’s completed result contains a link inventory and type counts. Broken Link Checker’s completed result contains a site audit with link assessments and a page list; its schema differs from the single-page response.

Phases

You may miss intermediate phases between polls. Drive your client from status, not the wording of progress.message. Discovery totals can grow, so they do not provide a stable overall completion percentage.

Complete polling example

Both examples start one job, check the HTTP response and envelope, poll until a terminal phase, and return the completed result. They accept either tool’s slug. They retry a rate-limited GET with bounded backoff, but do not automatically repeat a POST. Run JavaScript in a runtime with fetch and AbortSignal.timeout support. The Python example uses only the standard library. Keep API keys on your server.
The 15-minute timeout is a client-side example setting, not a service completion guarantee. Stopping polling does not cancel the server job. For production, retain the job ID, log X-Request-Id for troubleshooting, and handle transport failures according to your retry policy. GET status requests can be retried; a POST whose response was lost may already have created and charged a job.

Crawl limits

Both tools scan fetched HTML without executing page JavaScript. They discover sitemaps and follow internal links. A path under /docs does not restrict crawling to that path. Recognized assets are collected as links but are not traversed as pages. Sitemap discovery, the entry request, in-flight page requests, and the checker’s link assessment can make the total job duration exceed six minutes. A bounded crawl can finish successfully without covering every page. Broken Link Checker exposes truncatedPages and truncatedLinks. Link Extractor exposes only truncated for its returned link array; this flag does not describe page coverage. Neither endpoint supports client-selected limits, result pagination, job cancellation, or completion webhooks.

Job expiry

Jobs are held in memory. A job is eligible for removal 30 minutes after its last progress, result, or error update; cleanup runs every five minutes. Polling does not extend that window. A restart can lose state sooner. Save completed results in your own storage. Unknown or unavailable IDs return 404. The message depends on the tool:
Broken Link Checker
Link Extractor

Errors and billing

A rejected start can return 400 for invalid input, 401 for an invalid API key, 402 for insufficient credits, 403 for failed website human verification, or 429 for rate/quota limits. Non-2xx start requests are refunded by request metering. A successfully accepted 202 start is billed immediately. A later data.status: error does not automatically refund that charge. Polling is free even when the job has failed or is unavailable. Validation and missing-job errors have a string error; platform errors have an object with code and message. See Errors and the full endpoint references for examples.

Link Extractor

Start extraction, track progress, and read link metadata.

Broken Link Checker

Start an audit, track checking, and interpret link and page results.