> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spidra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Crawl Job Details

> Retrieve the full configuration and statistics for a specific crawl job, including instructions, token usage, and credit cost.

This endpoint returns the complete record for a crawl job: the original instructions you submitted, the job status, token consumption, and credit cost. It does not return the extracted page data. To get the actual content from each page, use [GET /crawl/{jobId}/pages](/api-reference/crawling/crawl-pages).

## When to Use This Endpoint

Use this endpoint when you need to:

* Inspect the `crawl_instruction` or `transform_instruction` that was used for a job
* Check token and credit costs for accounting or reporting
* Confirm job configuration before re-running an extraction with [POST /crawl/{jobId}/extract](/api-reference/crawling/crawl-extract)

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.spidra.io/api/crawl/job/abc-123 \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.spidra.io/api/crawl/job/abc-123",
      headers={"x-api-key": "YOUR_API_KEY"}
  )
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.spidra.io/api/crawl/job/abc-123", {
    headers: { "x-api-key": "YOUR_API_KEY" }
  });
  ```
</CodeGroup>

## Response Fields

| Field                   | Type    | Description                                                   |
| ----------------------- | ------- | ------------------------------------------------------------- |
| `id`                    | string  | Unique job identifier                                         |
| `base_url`              | string  | The starting URL that was crawled                             |
| `crawl_instruction`     | string  | The instruction used to decide which pages to follow          |
| `transform_instruction` | string  | The AI prompt used to extract data from each page             |
| `max_pages`             | integer | Maximum pages requested                                       |
| `pages_crawled`         | integer | Pages that were successfully processed                        |
| `status`                | string  | Current status: `waiting`, `active`, `completed`, or `failed` |
| `created_at`            | string  | ISO 8601 timestamp when the job was created                   |
| `updated_at`            | string  | ISO 8601 timestamp of the last status update                  |
| `input_tokens`          | number  | Total input tokens consumed by the AI across all pages        |
| `output_tokens`         | number  | Total output tokens generated by the AI across all pages      |
| `credits_used`          | number  | Total credits charged for this job                            |

## Example Response

```json theme={null}
{
  "id": "abc-123",
  "base_url": "https://example.com/blog",
  "crawl_instruction": "Crawl all blog post pages",
  "transform_instruction": "Extract title, author, publish date, and the first 200 words of the body",
  "max_pages": 10,
  "pages_crawled": 8,
  "status": "completed",
  "created_at": "2025-12-17T15:00:00Z",
  "updated_at": "2025-12-17T15:03:42Z",
  "input_tokens": 14820,
  "output_tokens": 3210,
  "credits_used": 25
}
```

<Note>
  This endpoint returns job configuration and stats only. For the actual extracted content from each page, call [GET /crawl/{jobId}/pages](/api-reference/crawling/crawl-pages).
</Note>


## OpenAPI

````yaml GET /crawl/job/{jobId}
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authentication is via API
    key passed in the `x-api-key` header.
servers:
  - url: https://api.spidra.io/api
security:
  - ApiKeyAuth: []
paths:
  /crawl/job/{jobId}:
    get:
      tags:
        - Crawling
      summary: Get Crawl Job Details
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Job details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  base_url:
                    type: string
                  crawl_instruction:
                    type: string
                  transform_instruction:
                    type: string
                  max_pages:
                    type: integer
                  pages_crawled:
                    type: integer
                  status:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  input_tokens:
                    type: number
                  output_tokens:
                    type: number
                  credits_used:
                    type: number
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Access token invalid or expired
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
      required:
        - status
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````