A template packages a config with its URL list and selector set for one target site. If you run the same job repeatedly, a template saves you from resending selectors every time.

Base path: /user-templates Authentication: an x-api-key header or a session cookie.

GET /user-templates

curl https://api.jetscrape.com/user-templates -H "x-api-key: js_YOUR_API_KEY"

GET /user-templates/available-configs

Lists the configs you can attach a template to.

curl https://api.jetscrape.com/user-templates/available-configs \
  -H "x-api-key: js_YOUR_API_KEY"

POST /user-templates

curl -X POST https://api.jetscrape.com/user-templates \
  -H "Content-Type: application/json" \
  -H "x-api-key: js_YOUR_API_KEY" \
  -d '{
    "configId": 42,
    "name": "My Template"
  }'
  • configId (number, required) — the config to attach.
  • name (string, required) — the template name.

PATCH /user-templates/:configId

Updates one URL record belonging to the template.

curl -X PATCH https://api.jetscrape.com/user-templates/42 \
  -H "Content-Type: application/json" \
  -H "x-api-key: js_YOUR_API_KEY" \
  -d '{
    "urlID": 5,
    "url": "https://example.com/updated",
    "isActive": true
  }'
  • urlID (number) — the URL record to update.
  • url (string) — the new address.
  • isActive (boolean) — inactive URLs are skipped during runs.

Typical setup order

1. available-configs     →  find a suitable config
2. POST /user-templates  →  create the template
3. set-url / set-bulk-url→  add the URLs
4. create-selector       →  define the fields to extract
5. create-routine        →  make it runnable
6. POST /webhook/run-routine  →  run it

Most /user-templates endpoints call a microservice in the background. If that call exceeds 50 seconds you get 504 Gateway Timeout; retrying usually resolves it.

Last updated: September 22, 2026