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

> Extract a single product from a URL. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Extract a single product from a URL.

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

## 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_product',
  {
    "url": "https://example.com/resource"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run contextdev_post_brand_ai_product --input '{
  "url": "https://example.com/resource"
}'
```

## 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_product --json` for the latest machine-readable contract.

## Input reference

Given a single URL, determines if it is a product page and extracts the product information.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.url` | `string` | Yes | — | The product page URL to extract product data from. Format: `uri`. |
| `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.zdr` | `"enabled" \| "disabled"` | No | `"disabled"` | `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR. Allowed: `enabled`, `disabled`. |
| `payload.tags` | `array` | No | — | Labels for filtering usage in the dashboard. Maximum items: 20. |
| `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": "Given a single URL, determines if it is a product page and extracts the product information.",
    "properties": {
      "url": {
        "type": "string",
        "description": "The product page URL to extract product data from.",
        "format": "uri"
      },
      "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
      },
      "zdr": {
        "type": "string",
        "description": "`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.",
        "default": "disabled",
        "enum": [
          "enabled",
          "disabled"
        ]
      },
      "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": [
      "url"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.partial` | `boolean` | No | — | — |
| `result.data.is_product_page` | `boolean` | No | — | — |
| `result.data.platform` | `"amazon" \| "tiktok_shop" \| "etsy" \| "generic" \| null` | No | — | Allowed: `amazon`, `tiktok_shop`, `etsy`, `generic`, `null`. |
| `result.data.product` | `object \| null` | No | — | — |
| `result.data.product.name` | `string` | Yes | — | — |
| `result.data.product.description` | `string` | Yes | — | — |
| `result.data.product.price` | `number \| null` | No | — | — |
| `result.data.product.regular_price` | `number \| null` | No | — | — |
| `result.data.product.currency` | `string \| null` | No | — | — |
| `result.data.product.billing_frequency` | `"monthly" \| "yearly" \| "one_time" \| "usage_based" \| null` | No | — | Allowed: `monthly`, `yearly`, `one_time`, `usage_based`, `null`. |
| `result.data.product.pricing_model` | `"per_seat" \| "flat" \| "tiered" \| "freemium" \| "custom" \| null` | No | — | Allowed: `per_seat`, `flat`, `tiered`, `freemium`, `custom`, `null`. |
| `result.data.product.url` | `string \| null` | No | — | — |
| `result.data.product.category` | `string \| null` | No | — | — |
| `result.data.product.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.product.dimensions` | `array` | No | — | — |
| `result.data.product.features` | `array` | Yes | — | — |
| `result.data.product.target_audience` | `array` | Yes | — | — |
| `result.data.product.tags` | `array` | Yes | — | — |
| `result.data.product.image_url` | `string \| null` | No | — | — |
| `result.data.product.images` | `array` | Yes | — | — |
| `result.data.product.variants` | `array` | No | — | — |
| `result.data.product.variants[].sku` | `string \| null` | Yes | — | — |
| `result.data.product.variants[].price` | `number \| null` | No | — | — |
| `result.data.product.variants[].currency` | `string \| null` | No | — | — |
| `result.data.product.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.product.variants[].attributes` | `record` | Yes | — | — |
| `result.data.product.variants[].url` | `string \| null` | Yes | — | — |
| `result.data.product.variants[].images` | `array` | Yes | — | — |
| `result.data.product.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"
          },
          "is_product_page": {
            "type": "boolean"
          },
          "platform": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "amazon",
              "tiktok_shop",
              "etsy",
              "generic",
              null
            ]
          },
          "product": {
            "type": [
              "object",
              "null"
            ],
            "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.