Skip to main content
POST
/
brand
/
ai
/
query
JavaScript
import BrandDev from 'brand.dev';

const client = new BrandDev({
  apiKey: 'My API Key',
});

const response = await client.brand.aiQuery({
  data_to_extract: [
    {
      datapoint_description: 'datapoint_description',
      datapoint_example: 'datapoint_example',
      datapoint_name: 'datapoint_name',
      datapoint_type: 'text',
    },
  ],
  domain: 'domain',
});

console.log(response.data_extracted);
{
  "status": "<string>",
  "domain": "<string>",
  "urls_analyzed": [
    "<string>"
  ],
  "data_extracted": [
    {
      "datapoint_name": "<string>",
      "datapoint_value": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
domain
string
required

The domain name to analyze

data_to_extract
object[]
required

Array of data points to extract from the website

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).

Required range: 1 <= x <= 300000
specific_pages
object

Optional object specifying which pages to analyze

Response

Successful response

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

I