tools

Read part of a stored result. A tool whose result exceeded max_inline_chars returned a preview and a result_handle; this reads the stored copy by character range (slice), by case-insensitive literal search with context and offsets (search), by line (lines), or by dotted JSON path (json_path). Results are kept for 1 hour and are readable only by the account that produced them. Nothing is fetched.

post/tools/read_result

Request

  • Base URL: https://www.crawlforge.dev/api/v1
  • URL: https://www.crawlforge.dev/api/v1/tools/read_result
  • Auth: API key in header X-API-Key

Request body

handlestring required

The result_handle returned by a tool (res_ followed by a UUID)

operation'slice' | 'search' | 'lines' | 'json_path' required

slice: a character range. search: every case-insensitive literal occurrence of query, each with its offset and 200 chars of context on each side. lines: a page of lines. json_path: one field of the stored JSON.

offsetinteger

slice: first character index. lines: first line index.

lengthinteger

slice: characters to return (default 10000, max 200000). lines: lines to return (default 200, max 5000). Both are also capped at max_inline_chars.

querystring

search: the literal text to find (1-500 chars); never interpreted as a pattern

max_matchesinteger

search: matches to return (1-100); total_matches still counts every occurrence

pathstring

json_path: dotted path into the stored result, e.g. "formats.links[0].href" or "formats.links.0.href". Keys and indexes only — no wildcards. The subject is the stored payload, or the parsed body when the stored text is itself JSON. A path that does not resolve is a 400 naming the keys available where it stopped.

max_inline_charsinteger

Cap on the characters this call returns (1000-10000000)

Response

The tool's result; 1 credits charged (see x-credits-note and x-extra for add-ons).

successtrue required
dataobject required

The tool's result. Its shape is tool-specific and documented on the tool's docs page (x-docs-url on the operation).

credits_usedinteger required

Credits charged for this call: the operation's x-credits, plus any add-on x-credits-note or x-extra describes.

credits_remaininginteger required

The account's credit balance after this call.

processing_timeinteger required

Server-side processing time in milliseconds.

warningsstring[]

Non-fatal notes: a robots.txt override that was recorded, a format that could not be produced, a redaction that changed the payload.

Changes

No recorded changes to this operation across all 1 revision of this API.