Selectors saved on a config apply to every run of its routines. The field names here differ slightly from inline selectors: attribute_value instead of attribute, and no children. All tools take apiKey and configId.
get_template_selectors
Upstream: POST /user-templates/get-selectors
Returns the selector list, each with its numeric selectorId.
{ "name": "get_template_selectors", "arguments": { "apiKey": "js_YOUR_API_KEY", "configId": 4412 } }create_template_selector
Upstream: POST /user-templates/create-selector
selector(string, required) — CSS selector or JSON path, depending on the type.property_name(string, required) — output field name;[]suffix for lists.attribute_type(enum, required) — the same setscrape_unblockeraccepts. See Selector Reference.attribute_value(string) — HTML attribute name whenattribute_typeisATTRIBUTE.after_extraction(array) — transformations applied in order. See Post-Extraction Transformations.
{
"name": "create_template_selector",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"configId": 4412,
"property_name": "image[]",
"selector": ".product-card img",
"attribute_type": "ATTRIBUTE",
"attribute_value": "src"
}
}update_template_selector
Upstream: PATCH /user-templates/update-selector
Updates an existing selector; the tool to reach for when a site is redesigned. Provide at least one of selector, attribute_type, attribute_value or after_extraction.
selectorId(integer ≥ 1, required).selector,attribute_type,attribute_value,after_extraction— the new values.
{
"name": "update_template_selector",
"arguments": {
"apiKey": "js_YOUR_API_KEY",
"configId": 4412,
"selectorId": 91,
"selector": ".product-card .price__current",
"attribute_type": "TEXT"
}
}When a selector breaks
- Test candidate selectors against the same page with
scrape_unblockerand readdiagnostics. - Once one fills, write it back with
update_template_selector. - Re-run the routine. Earlier results are unaffected.
after_extraction only takes effect through these two tools. Passing it on scrape_unblocker's inline selectors is silently dropped upstream.