after_extraction is an ordered list of transformations applied to a selector's value. Each entry has a method and an optional params string whose format depends on the method; ### is the separator wherever one is needed.

"after_extraction": [
  { "method": "INSERT_CHAR_FROM_END_AT_INDEX", "params": ".###2" },
  { "method": "MERGE_WITH_EXTRACTED", "params": "%ropo% TRY" }
]

Where it works

after_extraction reaches the engine only through create_template_selector and update_template_selector. An equivalent field on scrape_unblocker's inline selectors is dropped upstream and never persists, so the scrape appears to succeed with untransformed values. To format values from an API, create the config first (one scrape_unblocker call), then add or update its selectors through the template tools.

Methods

  • MERGE_WITH_EXTRACTED — put the value into a template, marking its place with %ropo%. Turns a slug into a full link: https://www.example.com/%ropo%.
  • INSERT_CHAR_FROM_END_AT_INDEX — insert a character N positions from the end. Turns minor-unit prices into decimals: ,###2 makes 8750 into 87,50; .###2 gives 87.50.
  • REPLACE_ALL — old###new; replaces every occurrence.
  • REMOVE_ALL — params is the substring to delete.
  • REPLACE_LAST — target###replacement; only the last occurrence.
  • SPLIT_BEFORE / SPLIT_AFTER — params is the delimiter; keeps the part before or after it.
  • EXTRACT_WITH_REGEX — params is the pattern; returns what it matches.
  • IF_EQUALS_X_SET_Y_ELSE_Z — x,y,z; if the value equals x return y, otherwise z.
  • DEFAULT_VALUE — replaces the value with params outright.
  • BASE64_DECODE — no params.
  • UNQOUTE — no params. The spelling is the engine's.
  • ITERATE_URL — builds the next page's URL from this one. <param>=###<step>###<max>, e.g. sayfa=###1###50 walks ?sayfa=1 to ?sayfa=50 one at a time and returns empty once past the max.
  • ITERATE_BODY — the same idea for a paging value carried in the request body.

Worked examples

A relative product link into an absolute URL:

{
  "name": "create_template_selector",
  "arguments": {
    "apiKey": "js_YOUR_API_KEY",
    "configId": 4412,
    "property_name": "url[]",
    "selector": "products.slug",
    "attribute_type": "JSON",
    "after_extraction": [
      { "method": "MERGE_WITH_EXTRACTED", "params": "https://shop.example.com/p/%ropo%" }
    ]
  }
}

A price in kuruş into lira with two decimals:

{
  "name": "create_template_selector",
  "arguments": {
    "apiKey": "js_YOUR_API_KEY",
    "configId": 4412,
    "property_name": "price[]",
    "selector": "products.price.amountMinor",
    "attribute_type": "JSON",
    "after_extraction": [
      { "method": "INSERT_CHAR_FROM_END_AT_INDEX", "params": ",###2" }
    ]
  }
}

Earlier tool versions offered TRIM, TO_LOWER and TO_UPPER. They do not exist in the engine: sending one is not an error, the value simply comes back untouched. They have been removed from the schema so a caller cannot "trim" a field and be told nothing.

Last updated: September 22, 2026