Templates are per API key ownership in Scout’s template store. Use them when the same selectors run across many URLs (product pages, blog posts). They are not a marketplace of site-specific scrapers — just your saved field lists.
hostname is organizational only
Optional
hostname is a label for your own list (so you can remember “this template is for shop.example.com”). It is purely cosmetic — it does not trigger, require, or interact with domain verify. Sensitive ops still need a separately verified domain. CRUD
GET
/v1/templatesAPI keyList templates for this key. 0 credits.
POST
/v1/templatesAPI keyCreate a template. 0 credits.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | required | Display name (max 120). |
slug | string | optional | Optional stable slug for template_id. |
description | string | optional | Short note (max 500). |
hostname | string | optional | Optional label for organization only — not domain verify. |
fields | array | required | 1–50 extract field definitions. |
curl -X POST https://scout.macrocontent.dev/v1/templates \
-H "Authorization: Bearer sk_scout_…" \
-H "Content-Type: application/json" \
-d @template.json{
"name": "Product page",
"slug": "product-page",
"hostname": "shop.example.com",
"fields": [
{ "name": "title", "selector": "h1", "type": "text" },
{ "name": "price", "selector": "[data-price]", "type": "text" }
]
}GET
/v1/templates/:idOrSlugAPI keyFetch one template by id or slug. 0 credits.
PATCH
/v1/templates/:idAPI keyUpdate fields / metadata. 0 credits.
DELETE
/v1/templates/:idAPI keyDelete template. 0 credits.
Use in extract
{
"url": "https://shop.example.com/product/1",
"template_id": "product-page"
} Field schema matches extract (exists, text, html, attribute, count, list).