> ## 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 Products

> Extract products from a brand's website. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Extract products from a brand's website.

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

## 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_post_brand_ai_products',
  {
    "domain": "example.com"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run contextdev_post_brand_ai_products --input '{
  "domain": "example.com"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "cache_metadata": {
      "status": "hit",
      "age_ms": 123
    },
    "request_id": "123e4567-e89b-42d3-a456-426614174000"
  }
}
```

Use `deepline describe contextdev_post_brand_ai_products --json` for the latest machine-readable contract.

## Input reference

Extract product information from a brand's website.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.domain` | `string` | No | — | The domain name to analyze. Minimum length: 3. |
| `payload.maxProducts` | `integer` | No | — | Maximum number of products to extract. Minimum: 1. Maximum: 12. |
| `payload.maxAgeMs` | `integer` | No | `604800000` | Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 7 days (604800000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh. Minimum: 0. Maximum: 2592000000. |
| `payload.timeoutOpts` | `object` | No | — | Request deadline and what to return when it passes. |
| `payload.tags` | `array` | No | — | Labels for filtering usage in the dashboard. Maximum items: 20. |
| `payload.directUrl` | `string` | No | — | A specific URL to use directly as the starting point for extraction without domain resolution. Format: `uri`. |
| `payload.timeoutMS` | `integer` | No | — | Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds. sent as timeoutOpts with the "fail" behavior. Minimum: 1000. Maximum: 300000. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Extract product information from a brand's website.",
    "properties": {
      "domain": {
        "type": "string",
        "description": "The domain name to analyze.",
        "minLength": 3
      },
      "maxProducts": {
        "type": "integer",
        "description": "Maximum number of products to extract.",
        "minimum": 1,
        "maximum": 12
      },
      "maxAgeMs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 7 days (604800000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.",
        "default": 604800000,
        "minimum": 0,
        "maximum": 2592000000
      },
      "timeoutOpts": {
        "type": "object",
        "description": "Request deadline and what to return when it passes.",
        "properties": {
          "milliseconds": {
            "type": "integer",
            "description": "Deadline in milliseconds.",
            "minimum": 1000,
            "maximum": 300000
          },
          "behavior": {
            "type": "string",
            "description": "\"fail\" returns 408 at the deadline. \"return-partial\" returns available results; inspect the response’s partial flag.",
            "default": "fail",
            "enum": [
              "fail",
              "return-partial"
            ]
          }
        },
        "required": [
          "milliseconds"
        ],
        "additionalProperties": false
      },
      "tags": {
        "type": "array",
        "description": "Labels for filtering usage in the dashboard.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      },
      "directUrl": {
        "type": "string",
        "description": "A specific URL to use directly as the starting point for extraction without domain resolution.",
        "format": "uri"
      },
      "timeoutMS": {
        "type": "integer",
        "description": "Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds; sent as timeoutOpts with the \"fail\" behavior.",
        "minimum": 1000,
        "maximum": 300000
      }
    },
    "required": [],
    "anyOf": [
      {
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "The domain name to analyze.",
            "minLength": 3
          },
          "maxProducts": {
            "type": "integer",
            "description": "Maximum number of products to extract.",
            "minimum": 1,
            "maximum": 12
          },
          "maxAgeMs": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 7 days (604800000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.",
            "default": 604800000,
            "minimum": 0,
            "maximum": 2592000000
          },
          "timeoutOpts": {
            "type": "object",
            "description": "Request deadline and what to return when it passes.",
            "properties": {
              "milliseconds": {
                "type": "integer",
                "description": "Deadline in milliseconds.",
                "minimum": 1000,
                "maximum": 300000
              },
              "behavior": {
                "type": "string",
                "description": "\"fail\" returns 408 at the deadline. \"return-partial\" returns available results; inspect the response’s partial flag.",
                "default": "fail",
                "enum": [
                  "fail",
                  "return-partial"
                ]
              }
            },
            "required": [
              "milliseconds"
            ],
            "additionalProperties": false
          },
          "tags": {
            "type": "array",
            "description": "Labels for filtering usage in the dashboard.",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            }
          },
          "timeoutMS": {
            "type": "integer",
            "description": "Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds; sent as timeoutOpts with the \"fail\" behavior.",
            "minimum": 1000,
            "maximum": 300000
          }
        },
        "required": [
          "domain"
        ],
        "additionalProperties": false
      },
      {
        "type": "object",
        "properties": {
          "directUrl": {
            "type": "string",
            "description": "A specific URL to use directly as the starting point for extraction without domain resolution.",
            "format": "uri"
          },
          "maxProducts": {
            "type": "integer",
            "description": "Maximum number of products to extract.",
            "minimum": 1,
            "maximum": 12
          },
          "maxAgeMs": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 7 days (604800000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.",
            "default": 604800000,
            "minimum": 0,
            "maximum": 2592000000
          },
          "timeoutOpts": {
            "type": "object",
            "description": "Request deadline and what to return when it passes.",
            "properties": {
              "milliseconds": {
                "type": "integer",
                "description": "Deadline in milliseconds.",
                "minimum": 1000,
                "maximum": 300000
              },
              "behavior": {
                "type": "string",
                "description": "\"fail\" returns 408 at the deadline. \"return-partial\" returns available results; inspect the response’s partial flag.",
                "default": "fail",
                "enum": [
                  "fail",
                  "return-partial"
                ]
              }
            },
            "required": [
              "milliseconds"
            ],
            "additionalProperties": false
          },
          "tags": {
            "type": "array",
            "description": "Labels for filtering usage in the dashboard.",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            }
          },
          "timeoutMS": {
            "type": "integer",
            "description": "Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds; sent as timeoutOpts with the \"fail\" behavior.",
            "minimum": 1000,
            "maximum": 300000
          }
        },
        "required": [
          "directUrl"
        ],
        "additionalProperties": false
      }
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.partial` | `boolean` | No | — | — |
| `result.data.products` | `array` | No | — | — |
| `result.data.products[].name` | `string` | Yes | — | — |
| `result.data.products[].description` | `string` | Yes | — | — |
| `result.data.products[].price` | `number \| null` | No | — | — |
| `result.data.products[].regular_price` | `number \| null` | No | — | — |
| `result.data.products[].currency` | `string \| null` | No | — | — |
| `result.data.products[].billing_frequency` | `"monthly" \| "yearly" \| "one_time" \| "usage_based" \| null` | No | — | Allowed: `monthly`, `yearly`, `one_time`, `usage_based`, `null`. |
| `result.data.products[].pricing_model` | `"per_seat" \| "flat" \| "tiered" \| "freemium" \| "custom" \| null` | No | — | Allowed: `per_seat`, `flat`, `tiered`, `freemium`, `custom`, `null`. |
| `result.data.products[].url` | `string \| null` | No | — | — |
| `result.data.products[].category` | `string \| null` | No | — | — |
| `result.data.products[].availability` | `"in_stock" \| "out_of_stock" \| "limited_availability" \| "preorder" \| "backorder" \| "made_to_order" \| "discontinued" \| null` | No | — | Allowed: `in_stock`, `out_of_stock`, `limited_availability`, `preorder`, `backorder`, `made_to_order`, `discontinued`, `null`. |
| `result.data.products[].dimensions` | `array` | No | — | — |
| `result.data.products[].features` | `array` | Yes | — | — |
| `result.data.products[].target_audience` | `array` | Yes | — | — |
| `result.data.products[].tags` | `array` | Yes | — | — |
| `result.data.products[].image_url` | `string \| null` | No | — | — |
| `result.data.products[].images` | `array` | Yes | — | — |
| `result.data.products[].variants` | `array` | No | — | — |
| `result.data.products[].variants[].sku` | `string \| null` | Yes | — | — |
| `result.data.products[].variants[].price` | `number \| null` | No | — | — |
| `result.data.products[].variants[].currency` | `string \| null` | No | — | — |
| `result.data.products[].variants[].availability` | `"in_stock" \| "out_of_stock" \| "limited_availability" \| "preorder" \| "backorder" \| "made_to_order" \| "discontinued" \| null` | No | — | Allowed: `in_stock`, `out_of_stock`, `limited_availability`, `preorder`, `backorder`, `made_to_order`, `discontinued`, `null`. |
| `result.data.products[].variants[].attributes` | `record` | Yes | — | — |
| `result.data.products[].variants[].url` | `string \| null` | Yes | — | — |
| `result.data.products[].variants[].images` | `array` | Yes | — | — |
| `result.data.products[].sku` | `string \| null` | Yes | — | — |
| `result.data.cache_metadata` | `object` | Yes | — | — |
| `result.data.cache_metadata.status` | `"hit" \| "miss" \| "zdr"` | Yes | — | Allowed: `hit`, `miss`, `zdr`. |
| `result.data.cache_metadata.age_ms` | `integer` | Yes | — | Minimum: 0. |
| `result.data.key_metadata` | `object` | No | — | — |
| `result.data.request_id` | `string` | Yes | — | Format: `uuid`. |
| `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": {
          "partial": {
            "type": "boolean"
          },
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "regular_price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "billing_frequency": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "monthly",
                    "yearly",
                    "one_time",
                    "usage_based",
                    null
                  ]
                },
                "pricing_model": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "per_seat",
                    "flat",
                    "tiered",
                    "freemium",
                    "custom",
                    null
                  ]
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "category": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "availability": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "in_stock",
                    "out_of_stock",
                    "limited_availability",
                    "preorder",
                    "backorder",
                    "made_to_order",
                    "discontinued",
                    null
                  ]
                },
                "dimensions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "features": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "target_audience": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "image_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "images": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "variants": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "sku": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "price": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "currency": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "availability": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "in_stock",
                          "out_of_stock",
                          "limited_availability",
                          "preorder",
                          "backorder",
                          "made_to_order",
                          "discontinued",
                          null
                        ]
                      },
                      "attributes": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "images": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "sku",
                      "attributes",
                      "url",
                      "images"
                    ],
                    "additionalProperties": false
                  }
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "description",
                "features",
                "target_audience",
                "tags",
                "images",
                "sku"
              ],
              "additionalProperties": false
            }
          },
          "cache_metadata": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "hit",
                  "miss",
                  "zdr"
                ]
              },
              "age_ms": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "status",
              "age_ms"
            ],
            "additionalProperties": false
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "cache_metadata",
          "request_id"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.01` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.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.