Selectors saved on a config apply to every run made with it, so you never resend them in the request body.
POST /user-templates/get-selectors
curl -X POST https://api.jetscrape.com/user-templates/get-selectors \
-H "Content-Type: application/json" \
-H "x-api-key: js_YOUR_API_KEY" \
-d '{ "configId": 42 }'POST /user-templates/create-selector
curl -X POST https://api.jetscrape.com/user-templates/create-selector \
-H "Content-Type: application/json" \
-H "x-api-key: js_YOUR_API_KEY" \
-d '{
"configId": 42,
"propertyName": "price",
"selector": "span.price",
"attributeType": "TEXT"
}'configId(number, required) — the config it belongs to.propertyName(string, required) — the output field name.selector(string, required) — the CSS selector.attributeType(string, required) —TEXT,ATTRIBUTE,OBJECT,JSONand so on.
The full list of types and the nesting patterns are in the Selector Guide.
PATCH /user-templates/update-selector
Updates an existing selector — the endpoint you reach for when a target site is redesigned.
curl -X PATCH https://api.jetscrape.com/user-templates/update-selector \
-H "Content-Type: application/json" \
-H "x-api-key: js_YOUR_API_KEY" \
-d '{
"selectorId": 10,
"selector": "div.new-price",
"attributeType": "TEXT"
}'selectorId(number, required) — the selector to update.selector(string, optional) — the new CSS path.attributeType(string, optional) — the new type.propertyName(string, optional) — the new field name.
When a selector breaks
- Test candidate selectors against the same page with
POST /webhook/unblocker. - Once one works, write it back with
update-selector. - Re-run the routine. Results from earlier runs are unaffected.