Guide
Scrape Templates
Browse the public template marketplace and fetch a template's request configuration by slug.
Authentication
Template endpoints accept the same X-API-Key header as the rest of the API. Dashboard users manage templates at /dashboard/workflows/templates.
List Templates
GET /api/v1/templates returns public templates with page, page_size and an optional tag filter. The response has templates, total, page and page_size.
Bash
curl "https://api.alterlab.io/api/v1/templates?tag=ecommerce&page=1&page_size=20" -H "X-API-Key: $ALTERLAB_API_KEY"Get a Template
GET /api/v1/templates/{slug} returns id, slug, name, description, url_pattern, request_config, tags, use_count, created_by_team, created_at and updated_at. Pass request_config as the body of a scrape request to reuse it.
Bash
curl https://api.alterlab.io/api/v1/templates/my-template-slug -H "X-API-Key: $ALTERLAB_API_KEY"Using a Template
The request_config object is a scrape request body. Fetch it, replace the URL with one that matches url_pattern, and POST it to /api/v1/scrape.
Bash
curl -X POST https://api.alterlab.io/api/v1/scrape -H "X-API-Key: $ALTERLAB_API_KEY" -H "Content-Type: application/json" -d '{"url": "https://example.com/item/1", "formats": ["json"]}'