> ## 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 Post Brand Ai Query

> Query website data using AI. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Query website data using AI.

<Info>
  Tool ID: `contextdev_post_brand_ai_query`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_post_brand_ai_query',
  {
    "domain": "example.com",
    "data_to_extract": [
      {
        "datapoint_name": "Example",
        "datapoint_type": "text",
        "datapoint_description": "example",
        "datapoint_example": "example"
      }
    ]
  },
);

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

### CLI

```bash theme={null}
deepline tools execute contextdev_post_brand_ai_query --input '{
  "domain": "example.com",
  "data_to_extract": [
    {
      "datapoint_name": "Example",
      "datapoint_type": "text",
      "datapoint_description": "example",
      "datapoint_example": "example"
    }
  ]
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "status": "example",
    "domain": "example.com",
    "urls_analyzed": [
      "https://example.com"
    ]
  }
}
```

Use `deepline tools get contextdev_post_brand_ai_query --json` for the latest machine-readable contract.

## Input reference

Use AI to extract specific data points from a brand's website. The AI will crawl the website and extract the requested information based on the provided data points.

| Name                      | Type      | Required | Default | Details                                                                                                                                                                                                                  |
| ------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.domain`          | `string`  | Yes      | —       | The domain name to analyze                                                                                                                                                                                               |
| `payload.specific_pages`  | `object`  | No       | —       | Optional object specifying which pages to analyze                                                                                                                                                                        |
| `payload.data_to_extract` | `array`   | Yes      | —       | Array of data points to extract from the website                                                                                                                                                                         |
| `payload.timeoutMS`       | `integer` | No       | —       | Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). Minimum: 1000. Maximum: 300000. |
| `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={null}
  {
    "type": "object",
    "description": "Use AI to extract specific data points from a brand's website. The AI will crawl the website and extract the requested information based on the provided data points.",
    "properties": {
      "domain": {
        "type": "string",
        "description": "The domain name to analyze"
      },
      "specific_pages": {
        "type": "object",
        "description": "Optional object specifying which pages to analyze",
        "properties": {
          "home_page": {
            "type": "boolean",
            "description": "Whether to analyze the home page"
          },
          "blog": {
            "type": "boolean",
            "description": "Whether to analyze the blog"
          },
          "terms_and_conditions": {
            "type": "boolean",
            "description": "Whether to analyze the terms and conditions page"
          },
          "privacy_policy": {
            "type": "boolean",
            "description": "Whether to analyze the privacy policy page"
          },
          "about_us": {
            "type": "boolean",
            "description": "Whether to analyze the about us page"
          },
          "contact_us": {
            "type": "boolean",
            "description": "Whether to analyze the contact us page"
          },
          "careers": {
            "type": "boolean",
            "description": "Whether to analyze the careers page"
          },
          "faq": {
            "type": "boolean",
            "description": "Whether to analyze the FAQ page"
          },
          "pricing": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "data_to_extract": {
        "type": "array",
        "description": "Array of data points to extract from the website",
        "items": {
          "type": "object",
          "properties": {
            "datapoint_name": {
              "type": "string",
              "description": "Name of the data point to extract"
            },
            "datapoint_type": {
              "type": "string",
              "description": "Type of the data point",
              "enum": [
                "text",
                "number",
                "date",
                "boolean",
                "list",
                "url"
              ]
            },
            "datapoint_list_type": {
              "type": "string",
              "description": "Type of items in the list when datapoint_type is 'list'. Defaults to 'string'. Use 'object' to extract an array of objects matching a schema.",
              "default": "string",
              "enum": [
                "string",
                "text",
                "number",
                "date",
                "boolean",
                "list",
                "url",
                "object"
              ]
            },
            "datapoint_object_schema": {
              "type": "object",
              "description": "Schema definition for objects when datapoint_list_type is 'object'. Provide a map of field names to their scalar types.",
              "minProperties": 1,
              "additionalProperties": {
                "type": "string",
                "enum": [
                  "string",
                  "number",
                  "date",
                  "boolean"
                ]
              }
            },
            "datapoint_description": {
              "type": "string",
              "description": "Description of what to extract"
            },
            "datapoint_example": {
              "type": "string",
              "description": "Example of the expected value"
            }
          },
          "required": [
            "datapoint_name",
            "datapoint_type",
            "datapoint_description",
            "datapoint_example"
          ],
          "additionalProperties": false
        }
      },
      "timeoutMS": {
        "type": "integer",
        "description": "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
        "minimum": 1000,
        "maximum": 300000
      },
      "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": [
      "domain",
      "data_to_extract"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                                           | Type     | Required | Default | Details |
| ---------------------------------------------- | -------- | -------- | ------- | ------- |
| `result.data`                                  | `object` | Yes      | —       | —       |
| `result.data.status`                           | `string` | No       | —       | —       |
| `result.data.domain`                           | `string` | No       | —       | —       |
| `result.data.urls_analyzed`                    | `array`  | No       | —       | —       |
| `result.data.data_extracted`                   | `array`  | No       | —       | —       |
| `result.data.data_extracted[].datapoint_name`  | `string` | No       | —       | —       |
| `result.data.data_extracted[].datapoint_value` | `record` | No       | —       | —       |
| `result.data.key_metadata`                     | `object` | No       | —       | —       |
| `result.meta`                                  | `object` | No       | —       | —       |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "urls_analyzed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "data_extracted": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "datapoint_name": {
                  "type": "string"
                },
                "datapoint_value": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "additionalProperties": false
            }
          },
          "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](/docs/providers/contextdev/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
