> ## 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 List Batches

> List your Context.dev scraping batches, newest first, optionally filtered by status. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List your Context.dev scraping batches, newest first, optionally filtered by status.

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

## 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_list_batches',
  {
    "limit": 100,
    "cursor": "cursor_123",
    "status": "queued"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute contextdev_list_batches --input '{
  "limit": 100,
  "cursor": "cursor_123",
  "status": "queued"
}' --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": {
    "has_more": true,
    "next_cursor": "cursor_123"
  }
}
```

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

## Input reference

List your batches from newest to oldest. Filter by status or continue with a cursor.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.limit` | `integer` | No | — | Batches per page. Defaults to 25. Minimum: 1. Maximum: 100. |
| `payload.cursor` | `string` | No | — | Cursor from the previous page. |
| `payload.status` | `"queued" \| "running" \| "cancelling" \| "completed" \| "cancelled" \| "failed"` | No | — | Filter by status. Allowed: `queued`, `running`, `cancelling`, `completed`, `cancelled`, `failed`. |
| `payload.q` | `string` | No | — | Free-text search term, matched against the batch id, crawl source (start URL or sitemap domain), and tags. Maximum length: 200. |
| `payload.search_type` | `"exact" \| "prefix"` | No | — | `prefix` for as-you-type prefix matching (default), `exact` for full-token matching. Allowed: `exact`, `prefix`. |
| `payload.tags` | `string` | No | — | Comma-separated list of tags to filter by (matches batches having any of them). |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "List your batches from newest to oldest. Filter by status or continue with a cursor.",
    "properties": {
      "limit": {
        "type": "integer",
        "description": "Batches per page. Defaults to 25.",
        "minimum": 1,
        "maximum": 100
      },
      "cursor": {
        "type": "string",
        "description": "Cursor from the previous page."
      },
      "status": {
        "type": "string",
        "description": "Filter by status.",
        "enum": [
          "queued",
          "running",
          "cancelling",
          "completed",
          "cancelled",
          "failed"
        ]
      },
      "q": {
        "type": "string",
        "description": "Free-text search term, matched against the batch id, crawl source (start URL or sitemap domain), and tags.",
        "maxLength": 200
      },
      "search_type": {
        "type": "string",
        "description": "`prefix` for as-you-type prefix matching (default), `exact` for full-token matching.",
        "enum": [
          "exact",
          "prefix"
        ]
      },
      "tags": {
        "type": "string",
        "description": "Comma-separated list of tags to filter by (matches batches having any of them)."
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

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