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

# Context.dev: Contextdev Get Batch

> Check a Context.dev scraping batch's progress and get its result download links when done. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Check a Context.dev scraping batch's progress and get its result download links when done.

> [!NOTE]
>
> Tool ID: `contextdev_get_batch`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_get_batch',
  {
    "batch_id": "batch_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute contextdev_get_batch --input '{
  "batch_id": "batch_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "id": "id_123",
    "status": "queued",
    "mode": "scrape",
    "format": "markdown",
    "tags": [
      "example"
    ],
    "crawl": {
      "source": {
        "type": "start_url",
        "url": "https://example.com"
      },
      "max_pages": 123,
      "max_depth": 1,
      "follow_subdomains": true,
      "url_pattern": "https://example.com"
    },
    "input": {
      "reserved": 123,
      "reserved_is_ceiling": true,
      "submitted": 1,
      "duplicates": 123,
      "invalid": 1
    },
    "progress": {
      "succeeded": 123,
      "failed": 123,
      "pending": 123
    },
    "timing": {
      "created_at": "2026-01-15T12:00:00Z",
      "started_at": "2026-01-15T12:00:00Z",
      "completed_at": "2026-01-15T12:00:00Z"
    },
    "page_errors": [
      {
        "code": "example",
        "count": 123
      }
    ],
    "failure": {
      "code": "example",
      "message": "Example message"
    },
    "results": {
      "expires_at": "2026-01-15T12:00:00Z",
      "files": [
        {
          "url": "https://example.com",
          "items": 123,
          "bytes": 123
        }
      ]
    },
    "invalid_urls": [
      {
        "url": "https://example.com",
        "reason": "example"
      }
    ]
  }
}
```

Use `deepline describe contextdev_get_batch --json` for the latest machine-readable contract.

## Input reference

Check progress, and get download links once the batch finishes.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.batch_id` | `string` | Yes | — | ID of the batch to retrieve or cancel. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Check progress, and get download links once the batch finishes.",
    "properties": {
      "batch_id": {
        "type": "string",
        "description": "ID of the batch to retrieve or cancel."
      }
    },
    "required": [
      "batch_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.id` | `string` | Yes | — | — |
| `result.data.status` | `"queued" \| "running" \| "cancelling" \| "completed" \| "cancelled" \| "failed"` | Yes | — | Allowed: `queued`, `running`, `cancelling`, `completed`, `cancelled`, `failed`. |
| `result.data.mode` | `"scrape" \| "crawl"` | Yes | — | Allowed: `scrape`, `crawl`. |
| `result.data.format` | `"markdown" \| "html"` | Yes | — | Allowed: `markdown`, `html`. |
| `result.data.tags` | `array` | Yes | — | — |
| `result.data.crawl` | `object \| null` | Yes | — | — |
| `result.data.crawl.source` | `object` | Yes | — | — |
| `result.data.crawl.source.type` | `"start_url"` | Yes | — | — |
| `result.data.crawl.source.url` | `string` | Yes | — | — |
| `result.data.crawl.source.domain` | `string` | Yes | — | — |
| `result.data.crawl.max_pages` | `integer` | Yes | — | — |
| `result.data.crawl.max_depth` | `integer \| null` | Yes | — | — |
| `result.data.crawl.follow_subdomains` | `boolean` | Yes | — | — |
| `result.data.crawl.url_pattern` | `string \| null` | Yes | — | — |
| `result.data.input` | `object` | Yes | — | — |
| `result.data.input.reserved` | `integer` | Yes | — | — |
| `result.data.input.reserved_is_ceiling` | `boolean` | Yes | — | — |
| `result.data.input.submitted` | `integer \| null` | Yes | — | — |
| `result.data.input.duplicates` | `integer` | Yes | — | — |
| `result.data.input.invalid` | `integer \| null` | Yes | — | — |
| `result.data.progress` | `object` | Yes | — | — |
| `result.data.progress.succeeded` | `integer` | Yes | — | — |
| `result.data.progress.failed` | `integer` | Yes | — | — |
| `result.data.progress.pending` | `integer` | Yes | — | — |
| `result.data.timing` | `object` | Yes | — | — |
| `result.data.timing.created_at` | `string` | Yes | — | — |
| `result.data.timing.started_at` | `string \| null` | Yes | — | — |
| `result.data.timing.completed_at` | `string \| null` | Yes | — | — |
| `result.data.page_errors` | `array` | Yes | — | — |
| `result.data.page_errors[].code` | `string` | Yes | — | — |
| `result.data.page_errors[].count` | `integer` | Yes | — | — |
| `result.data.failure` | `object \| null` | Yes | — | — |
| `result.data.failure.code` | `string` | Yes | — | — |
| `result.data.failure.message` | `string` | Yes | — | — |
| `result.data.results` | `object \| null` | Yes | — | — |
| `result.data.results.expires_at` | `string` | Yes | — | — |
| `result.data.results.files` | `array` | Yes | — | — |
| `result.data.results.files[].url` | `string` | Yes | — | — |
| `result.data.results.files[].items` | `integer` | Yes | — | — |
| `result.data.results.files[].bytes` | `integer` | Yes | — | — |
| `result.data.key_metadata` | `object` | No | — | — |
| `result.data.invalid_urls` | `array` | Yes | — | — |
| `result.data.invalid_urls[].url` | `string` | Yes | — | — |
| `result.data.invalid_urls[].reason` | `string` | Yes | — | — |
| `result.meta` | `object` | No | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "cancelling",
              "completed",
              "cancelled",
              "failed"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "scrape",
              "crawl"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "markdown",
              "html"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "crawl": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "source": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "start_url"
                        ]
                      },
                      "url": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "url"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "sitemap"
                        ]
                      },
                      "domain": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "domain"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "max_pages": {
                "type": "integer"
              },
              "max_depth": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "follow_subdomains": {
                "type": "boolean"
              },
              "url_pattern": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "source",
              "max_pages",
              "max_depth",
              "follow_subdomains",
              "url_pattern"
            ],
            "additionalProperties": false
          },
          "input": {
            "type": "object",
            "properties": {
              "reserved": {
                "type": "integer"
              },
              "reserved_is_ceiling": {
                "type": "boolean"
              },
              "submitted": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "duplicates": {
                "type": "integer"
              },
              "invalid": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "reserved",
              "reserved_is_ceiling",
              "submitted",
              "duplicates",
              "invalid"
            ],
            "additionalProperties": false
          },
          "progress": {
            "type": "object",
            "properties": {
              "succeeded": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              },
              "pending": {
                "type": "integer"
              }
            },
            "required": [
              "succeeded",
              "failed",
              "pending"
            ],
            "additionalProperties": false
          },
          "timing": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "created_at",
              "started_at",
              "completed_at"
            ],
            "additionalProperties": false
          },
          "page_errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                }
              },
              "required": [
                "code",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "failure": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "results": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "expires_at": {
                "type": "string"
              },
              "files": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "items": {
                      "type": "integer"
                    },
                    "bytes": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "url",
                    "items",
                    "bytes"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "expires_at",
              "files"
            ],
            "additionalProperties": false
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          },
          "invalid_urls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "url",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "status",
          "mode",
          "format",
          "tags",
          "crawl",
          "input",
          "progress",
          "timing",
          "page_errors",
          "failure",
          "results",
          "invalid_urls"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Context.dev provider guide](https://deepline.com/docs/providers/contextdev/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.