curl --fail-with-body -sS \
  -X POST "https://api.adscrawl.net/spa-extract" \
  -H "x-api-key: $ADSCRAWL_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "url": "https://quotes.toscrape.com/js/",
  "waitUntil": "load",
  "timeoutMs": 60000,
  "userAgentMode": "random",
  "userAgentOs": "windows",
  "mode": "extract",
  "waitFor": {
    "selector": ".quote .text"
  },
  "fields": {
    "quote": {
      "source": "dom",
      "selector": ".quote .text",
      "parse": "string",
      "required": true
    },
    "author": {
      "source": "dom",
      "selector": ".quote .author",
      "parse": "string",
      "required": true
    }
  }
}' \
  --output extraction.json
