---
title: "Query website data using AI"
method: POST
path: "/brand/ai/query"
tags: ["AI Data Extraction"]
---

# Query website data using AI

`POST /brand/ai/query`

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.

## Request body

- object
  - `domain` string, required — The domain name to analyze
  - `timeoutMS` integer — 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).
  - `specific_pages` object — Optional object specifying which pages to analyze
    - `home_page` boolean — Whether to analyze the home page
    - `blog` boolean — Whether to analyze the blog
    - `terms_and_conditions` boolean — Whether to analyze the terms and conditions page
    - `privacy_policy` boolean — Whether to analyze the privacy policy page
    - `about_us` boolean — Whether to analyze the about us page
    - `contact_us` boolean — Whether to analyze the contact us page
    - `careers` boolean — Whether to analyze the careers page
    - `faq` boolean — Whether to analyze the FAQ page
    - `pricing` boolean — Whether to analyze the pricing page
  - `data_to_extract` object[], required — Array of data points to extract from the website
    - `datapoint_name` string, required — Name of the data point to extract
    - `datapoint_type` 'text' | 'number' | 'date' | 'boolean' | 'list' | 'url', required — Type of the data point
    - `datapoint_list_type` 'string' | 'text' | 'number' | 'date' | 'boolean' | 'list' | 'url' | 'object' — 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.
    - `datapoint_object_schema` object — Schema definition for objects when datapoint_list_type is 'object'. Provide a map of field names to their scalar types.
    - `datapoint_description` string, required — Description of what to extract
    - `datapoint_example` string, required — Example of the expected value

## Response `200`

Successful response

- object
  - `status` string — Status of the response, e.g., 'ok'
  - `domain` string — The domain that was analyzed
  - `urls_analyzed` string[] — List of URLs that were analyzed
  - `data_extracted` object[] — Array of extracted data points
    - `datapoint_name` string — Name of the extracted data point
    - `datapoint_value` union — Value of the extracted data point. Can be a primitive type, an array of primitives, or an array of objects when datapoint_list_type is 'object'.
      - string
      - number
      - boolean
      - string[]
      - number[]
      - object[]

## Other responses

- `400` — Bad Request - validation error
- `401` — Unauthorized
- `408` — Request Timeout
- `500` — Internal server error

## Changes

- **2026-02-12** `ec0e897d65be` — 1 breaking
  - the `timeoutMS` request property's min was increased to `1000.00`
- **2025-12-01** `e685328e362a` — 1 breaking, 3 info
  - added `subschema #6` to the `data_extracted/items/datapoint_value` response property `oneOf` list for the response status `200`
  - added the new optional request property `data_to_extract/items/datapoint_list_type`
  - added the new optional request property `data_to_extract/items/datapoint_object_schema`
  - added the new optional request property `specific_pages/pricing`

[Change history](https://skmtc.dev/context/apis/brand-api/changes/brand/ai/query/post.md)

---

[API](https://skmtc.dev/context/apis/brand-api.md) · [All operations](https://skmtc.dev/context/apis/brand-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/context/brand-api/revisions/05a30711e18b/schema)
