import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.ai.extractProducts({ domain: 'domain' });
console.log(response.products);{
"products": [
{
"name": "<string>",
"description": "<string>",
"features": [
"<string>"
],
"target_audience": [
"<string>"
],
"tags": [
"<string>"
],
"images": [
"<string>"
],
"price": 123,
"currency": "<string>",
"billing_frequency": "monthly",
"pricing_model": "per_seat",
"url": "<string>",
"category": "<string>",
"image_url": "<string>"
}
]
}Beta feature: Extract product information from a brand’s website. Brand.dev will analyze the website and return a list of products with details such as name, description, image, pricing, features, and more.
import ContextDev from 'context.dev';
const client = new ContextDev({
apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
});
const response = await client.ai.extractProducts({ domain: 'domain' });
console.log(response.products);{
"products": [
{
"name": "<string>",
"description": "<string>",
"features": [
"<string>"
],
"target_audience": [
"<string>"
],
"tags": [
"<string>"
],
"images": [
"<string>"
],
"price": 123,
"currency": "<string>",
"billing_frequency": "monthly",
"pricing_model": "per_seat",
"url": "<string>",
"category": "<string>",
"image_url": "<string>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful response
Array of products extracted from the website
Show child attributes
Was this page helpful?