> ## 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 Query Webdb Collection

> Filter, sort, and pick fields from the rows of a Context.dev WebDB collection. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Filter, sort, and pick fields from the rows of a Context.dev WebDB collection.

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

## 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_query_webdb_collection',
  {
    "collection_id": "collection_123"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute contextdev_query_webdb_collection --input '{
  "collection_id": "collection_123"
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe contextdev_query_webdb_collection --json` for the complete live contract.

## Input reference

Filters, sorts, and selects fields from collection rows.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.collection_id` | `string` | Yes | — | Collection ID. |
| `payload.where` | `record` | No | — | Filters rows by field values. Supports comparisons, lists, text matching, and boolean groups. |
| `payload.order_by` | `array` | No | — | Fields used to sort the results. Maximum items: 3. |
| `payload.select` | `array` | No | — | Fields to include in each row. `_id` is always included. Maximum items: 50. |
| `payload.limit` | `integer` | No | `25` | Maximum rows to return. Defaults to 25. Minimum: 1. Maximum: 200. |
| `payload.cursor` | `string` | No | — | Pagination cursor from a previous query. |
| `payload.tags` | `array` | No | — | Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters. Maximum items: 20. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Filters, sorts, and selects fields from collection rows.",
    "properties": {
      "collection_id": {
        "type": "string",
        "description": "Collection ID."
      },
      "where": {
        "type": "object",
        "description": "Filters rows by field values. Supports comparisons, lists, text matching, and boolean groups.",
        "additionalProperties": {}
      },
      "order_by": {
        "type": "array",
        "description": "Fields used to sort the results.",
        "maxItems": 3,
        "items": {
          "type": "object",
          "properties": {
            "field": {
              "type": "string",
              "description": "Field used to sort rows."
            },
            "dir": {
              "type": "string",
              "description": "Sort direction.",
              "default": "asc",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          "required": [
            "field"
          ],
          "additionalProperties": false
        }
      },
      "select": {
        "type": "array",
        "description": "Fields to include in each row. `_id` is always included.",
        "maxItems": 50,
        "items": {
          "type": "string",
          "minLength": 1
        }
      },
      "limit": {
        "type": "integer",
        "description": "Maximum rows to return. Defaults to 25.",
        "default": 25,
        "minimum": 1,
        "maximum": 200
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor from a previous query."
      },
      "tags": {
        "type": "array",
        "description": "Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      }
    },
    "required": [
      "collection_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.data` | `array` | Yes | — | — |
| `result.data.data[]._id` | `string` | Yes | — | — |
| `result.data.data[]._url` | `string` | Yes | — | — |
| `result.data.data[]._status` | `"pending" \| "active" \| "stale" \| "removed" \| "error" \| "cap_consumed"` | Yes | — | Allowed: `pending`, `active`, `stale`, `removed`, `error`, `cap_consumed`. |
| `result.data.data[]._collection` | `string` | Yes | — | — |
| `result.data.data[]._meta` | `object` | Yes | — | — |
| `result.data.data[]._meta.first_seen_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.data[]._meta.last_checked_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.data[]._meta.last_changed_at` | `string \| null` | Yes | — | Format: `date-time`. |
| `result.data.data[]._meta.change_count` | `integer` | Yes | — | — |
| `result.data.data[]._meta.version` | `integer` | Yes | — | — |
| `result.data.data[]._meta.eligibility_score` | `number \| null` | Yes | — | — |
| `result.data.data[]._meta.extraction_confidence` | `number \| null` | Yes | — | — |
| `result.data.data[]._meta.content_hash` | `string \| null` | Yes | — | — |
| `result.data.data[]._meta.capped_at` | `string \| null` | Yes | — | Format: `date-time`. |
| `result.data.data[]._meta.snapshot` | `object \| null` | Yes | — | — |
| `result.data.data[]._meta.snapshot.html_url` | `string` | No | — | — |
| `result.data.data[]._meta.snapshot.markdown_url` | `string` | No | — | — |
| `result.data.data[]._meta.snapshot.captured_at` | `string` | Yes | — | Format: `date-time`. |
| `result.data.data[]._meta.params` | `object \| null` | Yes | — | — |
| `result.data.data[]._meta.params.path` | `object \| null` | Yes | — | — |
| `result.data.data[]._meta.params.search` | `object \| null` | Yes | — | — |
| `result.data.data[]._meta.source` | `object` | Yes | — | — |
| `result.data.data[]._meta.source.target_id` | `string` | Yes | — | — |
| `result.data.data[]._meta.source.entry_urls` | `array` | Yes | — | — |
| `result.data.data[]._meta.fields` | `record` | Yes | — | — |
| `result.data.has_more` | `boolean` | Yes | — | — |
| `result.data.next_cursor` | `string \| null` | Yes | — | — |
| `result.data.scan_limited` | `boolean` | 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"
                },
                "_url": {
                  "type": "string"
                },
                "_status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "active",
                    "stale",
                    "removed",
                    "error",
                    "cap_consumed"
                  ]
                },
                "_collection": {
                  "type": "string"
                },
                "_meta": {
                  "type": "object",
                  "properties": {
                    "first_seen_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "last_checked_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "last_changed_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "change_count": {
                      "type": "integer"
                    },
                    "version": {
                      "type": "integer"
                    },
                    "eligibility_score": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "extraction_confidence": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "content_hash": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "capped_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "snapshot": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "html_url": {
                          "type": "string"
                        },
                        "markdown_url": {
                          "type": "string"
                        },
                        "captured_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "captured_at"
                      ],
                      "additionalProperties": false
                    },
                    "params": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "path": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "search": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "path",
                        "search"
                      ],
                      "additionalProperties": false
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "target_id": {
                          "type": "string"
                        },
                        "entry_urls": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "target_id",
                        "entry_urls"
                      ],
                      "additionalProperties": false
                    },
                    "fields": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "status": {
                            "type": "string",
                            "enum": [
                              "extracted",
                              "missing",
                              "invalid",
                              "low_confidence"
                            ]
                          },
                          "confidence": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "changed_at": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "required": [
                          "status",
                          "confidence"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "first_seen_at",
                    "last_checked_at",
                    "last_changed_at",
                    "change_count",
                    "version",
                    "eligibility_score",
                    "extraction_confidence",
                    "content_hash",
                    "capped_at",
                    "snapshot",
                    "params",
                    "source",
                    "fields"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "_id",
                "_url",
                "_status",
                "_collection",
                "_meta"
              ],
              "additionalProperties": true
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "scan_limited": {
            "type": "boolean"
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "has_more",
          "next_cursor"
        ],
        "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.