Deepcrawl
Activity Logs

Export Response

Export the response data from a specific operation.

Download the payload behind any log entry without rerunning the crawl. The worker reconstructs the original response and converts it to a convenient format for reports or debugging.

Endpoint

  • GET https://api.deepcrawl.dev/logs/export?id={requestId}&format={format}
  • Requires authentication (same as the other logs endpoints).

Formats

FormatWhen to useNotes
jsonDefault view of the response objectWorks for every endpoint. Returns the full discriminated union.
markdownYou only need rendered markdown contentSupported for read-getMarkdown and successful read-readUrl calls that generated markdown.
linksYou need the structured links treeWorks for links-getLinks and links-extractLinks responses that included tree: true.

Request Options – ExportResponseOptions

Prop

Type

Logs created via read-getMarkdown store the payload as a plain string. The export endpoint always returns that string, even if you request json or links format.

Example Request

curl "https://api.deepcrawl.dev/logs/export?id=log_456&format=markdown" \
  -H "Authorization: Bearer $DEEPCRAWL_API_KEY"

TypeScript SDK

import { DeepcrawlApp } from 'deepcrawl';

const dc = new DeepcrawlApp({ apiKey: process.env.DEEPCRAWL_API_KEY! });

const params: ExportResponseOptions = {
  id: 'log_456',
  format: 'markdown'
};
const result: ExportResponseOutput = await dc.exportResponse(params);

console.log(result);

Response – ExportResponseOutput

Prop

Type

Sample Outputs

  • format=json

    {
      "path": "read-readUrl",
      "success": true,
      "markdown": "# Example Page",
      "metadata": { "title": "Example Page" }
    }
  • format=links

    {
      "href": "https://example.com",
      "children": [
        { "href": "https://example.com/about", "text": "About" }
      ]
    }
  • format=markdown

    # Example Page
    
    Deepcrawl extracted this markdown from https://example.com.

Errors

  • 400 INVALID_EXPORT_FORMAT if a format is not supported for the log’s path.
  • 404 NOT_FOUND when the request ID does not belong to the authenticated account.
  • 401 UNAUTHORIZED for missing or invalid credentials.