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

# Get Job Status

> Get the current status and progress of a scraping job

Returns the current status and progress of a scraping job.

## Path Parameters

| Parameter | Type   | Description           |
| --------- | ------ | --------------------- |
| `job_id`  | string | Unique job identifier |

## Example Request

```javascript theme={null}
const checkStatus = async (jobId) => {
  const response = await fetch(`https://api.skop.dev/scrape/status/${jobId}`, {
    headers: {
      'Authorization': 'Bearer sk-your-api-key'
    }
  })
  
  return await response.json()
}
```

## Response (200 OK)

```json theme={null}
{
  "job_id": "job_123456789",
  "status": "extracting",
  "message": "Currently extracting documents from discovered pages",
  "created_at": "2024-01-15T10:00:00Z",
  "started_at": "2024-01-15T10:01:00Z",
  "estimated_completion": "2024-01-15T10:30:00Z",
  "completed_at": null,
  "current_agent": "scraper",
  "agents_completed": ["coordinator", "navigator"],
  "total_pages_crawled": 3,
  "total_documents_found": 12,
  "errors": [],
  "warnings": [],
  "is_active": true,
  "has_errors": false
}
```

### Response Fields

| Field                   | Type        | Description                                |
| ----------------------- | ----------- | ------------------------------------------ |
| `job_id`                | string      | Job identifier                             |
| `status`                | string      | Current job status                         |
| `message`               | string      | Human-readable status message              |
| `progress`              | number/null | Progress percentage (0-100) when available |
| `created_at`            | string      | ISO 8601 job creation timestamp            |
| `started_at`            | string/null | ISO 8601 job start timestamp               |
| `completed_at`          | string/null | ISO 8601 job completion timestamp          |
| `estimated_completion`  | string/null | ISO 8601 estimated completion time         |
| `current_agent`         | string/null | Currently active processing agent          |
| `agents_completed`      | array       | List of completed processing steps         |
| `total_pages_crawled`   | number      | Number of pages processed                  |
| `total_documents_found` | number      | Number of documents discovered             |
| `is_active`             | boolean     | Whether the job is currently running       |
| `has_errors`            | boolean     | Whether any errors occurred                |
| `errors`                | array       | List of error objects (if any)             |
| `warnings`              | array       | List of warning messages (if any)          |

### Job Status Values

| Status        | Description                  |
| ------------- | ---------------------------- |
| `pending`     | Job queued, waiting to start |
| `in_progress` | Job is actively running      |
| `completed`   | Job finished successfully    |
| `failed`      | Job failed due to errors     |
| `cancelled`   | Job was cancelled by user    |

## Error Responses

| Status | Description                    |
| ------ | ------------------------------ |
| `404`  | Job not found or access denied |
| `500`  | Internal server error          |

## Polling Pattern

```javascript theme={null}
const pollJobStatus = async (jobId) => {
  const checkStatus = async () => {
    const status = await fetch(`https://api.skop.dev/scrape/status/${jobId}`, {
      headers: { 'Authorization': 'Bearer sk-your-api-key' }
    }).then(r => r.json())
    
    console.log(`Status: ${status.status} (${status.total_documents_found} docs found)`)
    
    if (status.is_active) {
      // Still running, check again in 5 seconds
      setTimeout(checkStatus, 5000)
    } else {
      // Job completed (success or failure)
      console.log('Job finished:', status)
      return status
    }
  }
  
  return checkStatus()
}
```


## OpenAPI

````yaml GET /scrape/status/{job_id}
openapi: 3.1.0
info:
  title: Skop PDF Scraper API
  description: >-
    AI-powered document discovery and extraction from websites using natural
    language prompts
  version: 1.0.0
  contact:
    email: support@skop.dev
  license:
    name: MIT
servers:
  - url: https://api.skop.dev
    description: Production server
security:
  - bearerAuth: []
paths:
  /scrape/status/{job_id}:
    get:
      summary: Check Job Status
      description: Get the current status and progress of a scraping job
      operationId: getJobStatus
      parameters:
        - name: job_id
          in: path
          required: true
          description: Unique job identifier
          schema:
            type: string
            pattern: ^job_[a-z0-9]+$
      responses:
        '200':
          description: Job status information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JobStatusResponse:
      type: object
      properties:
        job_id:
          type: string
          pattern: ^job_[a-z0-9]+$
          description: Job identifier
        status:
          $ref: '#/components/schemas/JobStatus'
        message:
          type: string
          description: Human-readable status message
        progress:
          type: number
          minimum: 0
          maximum: 100
          nullable: true
          description: Progress percentage (0-100) when available
        created_at:
          type: string
          format: date-time
          description: ISO 8601 job creation timestamp
        started_at:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 job start timestamp
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 job completion timestamp
        estimated_completion:
          type: string
          format: date-time
          nullable: true
          description: ISO 8601 estimated completion time
        current_agent:
          type: string
          nullable: true
          description: Currently active processing agent
        agents_completed:
          type: array
          items:
            type: string
          description: List of completed processing steps
        total_pages_crawled:
          type: integer
          description: Number of pages processed
        total_documents_found:
          type: integer
          description: Number of documents discovered
        is_active:
          type: boolean
          description: Whether the job is currently running
        has_errors:
          type: boolean
          description: Whether any errors occurred
        errors:
          type: array
          items:
            $ref: '#/components/schemas/JobError'
          description: List of error objects (if any)
        warnings:
          type: array
          items:
            type: string
          description: List of warning messages (if any)
    ErrorResponse:
      type: object
      properties:
        error:
          type: boolean
          example: true
          description: Indicates this is an error response
        message:
          type: string
          description: Human-readable error message
        status_code:
          type: integer
          description: HTTP status code
        path:
          type: string
          description: API path that generated the error
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 error timestamp
    JobStatus:
      type: string
      enum:
        - pending
        - in_progress
        - completed
        - failed
        - cancelled
      description: Current status of the job
    JobError:
      type: object
      properties:
        error_id:
          type: string
          description: Unique error identifier
        agent_name:
          type: string
          description: Name of the agent that encountered the error
        error_type:
          type: string
          description: Category of error
        error_message:
          type: string
          description: Human-readable error description
        page_url:
          type: string
          format: uri
          nullable: true
          description: URL where error occurred (if applicable)
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 error timestamp
        is_recoverable:
          type: boolean
          description: Whether the error could potentially be recovered from
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key in format 'sk-xxxxxxxxxxxxx' or 'sk_xxxxxxxxxxxxx'

````