{
  "version": "1.0.0",
  "exported_at": "2026-06-02T03:00:00.000Z",
  "project": {
    "name": "Amazon Product Listing Scraper for India",
    "description": "Best-effort Amazon.in product listing scraper equivalent to the Octoparse Amazon India keyword template. It is preconfigured for the keyword \"lightning cable\" and navigates Amazon search result pages 1-20 using known page URLs. It extracts keyword, ASIN, title, detail page URL, star rating, review count, price, and current scrape time. Pagination uses navigate.urls plus loop-continue with append-mode CSV output. Amazon frequently serves anti-bot or Continue Shopping validation pages; this workflow detects the Continue Shopping text and clicks the validation button when present, but CAPTCHA/manual profile warm-up or compliant API access may still be required.",
    "color": "bg-[#ff9900]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 100,
      "position_y": 220,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 460,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.amazon.in/s?k=lightning+cable&page=1",
          "https://www.amazon.in/s?k=lightning+cable&page=2",
          "https://www.amazon.in/s?k=lightning+cable&page=3",
          "https://www.amazon.in/s?k=lightning+cable&page=4",
          "https://www.amazon.in/s?k=lightning+cable&page=5",
          "https://www.amazon.in/s?k=lightning+cable&page=6",
          "https://www.amazon.in/s?k=lightning+cable&page=7",
          "https://www.amazon.in/s?k=lightning+cable&page=8",
          "https://www.amazon.in/s?k=lightning+cable&page=9",
          "https://www.amazon.in/s?k=lightning+cable&page=10",
          "https://www.amazon.in/s?k=lightning+cable&page=11",
          "https://www.amazon.in/s?k=lightning+cable&page=12",
          "https://www.amazon.in/s?k=lightning+cable&page=13",
          "https://www.amazon.in/s?k=lightning+cable&page=14",
          "https://www.amazon.in/s?k=lightning+cable&page=15",
          "https://www.amazon.in/s?k=lightning+cable&page=16",
          "https://www.amazon.in/s?k=lightning+cable&page=17",
          "https://www.amazon.in/s?k=lightning+cable&page=18",
          "https://www.amazon.in/s?k=lightning+cable&page=19",
          "https://www.amazon.in/s?k=lightning+cable&page=20"
        ],
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 820,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1180,
      "position_y": 220,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "text-contains-1",
      "block_type": "process",
      "title": "Text Contains",
      "description": "Check if page contains text",
      "position_x": 1540,
      "position_y": 220,
      "config": {
        "text": "Continue shopping",
        "caseSensitive": false,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 1900,
      "position_y": 220,
      "config": {
        "selector": "form[action*=\"validateCaptcha\"] button[type=\"submit\"], button.a-button-text, input[type=\"submit\"], .a-button-text",
        "timeout": 15,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 2260,
      "position_y": 220,
      "config": {
        "duration": 4,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 2620,
      "position_y": 220,
      "config": {
        "timeout": 30,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 2980,
      "position_y": 500,
      "config": {
        "selector": "div[data-component-type=\"s-search-result\"][data-asin]",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#42be65]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 3340,
      "position_y": 500,
      "config": {
        "rowSelector": "div[data-component-type=\"s-search-result\"][data-asin]",
        "fileName": "amazon-product-listing-scraper-for-india.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "keyword",
            "selector": "new URL(window.location.href).searchParams.get(\"k\") || \"lightning cable\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "asin",
            "selector": "ROW.getAttribute(\"data-asin\") || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "title",
            "selector": "ROW.querySelector(\"h2 a span\")?.textContent?.trim() || ROW.querySelector(\"h2 span\")?.textContent?.trim() || ROW.querySelector(\"[data-cy='title-recipe'] h2 span\")?.textContent?.trim() || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "detail_page_url",
            "selector": "ROW.querySelector(\"h2 a\")?.href || ROW.querySelector(\"a.a-link-normal.s-no-outline\")?.href || ROW.querySelector(\"[data-cy='title-recipe'] a\")?.href || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "star_rating",
            "selector": "ROW.querySelector(\".a-icon-alt\")?.textContent?.trim() || ROW.querySelector(\"i[class*='a-icon-star'] span\")?.textContent?.trim() || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "number_of_reviews",
            "selector": "ROW.querySelector(\"a[href*='#customerReviews'] span\")?.textContent?.trim() || ROW.querySelector(\"a[href*='customerReviews']\")?.textContent?.trim() || ROW.querySelector(\"span[aria-label$='ratings']\")?.getAttribute(\"aria-label\") || ROW.querySelector(\"span[aria-label$='rating']\")?.getAttribute(\"aria-label\") || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "price",
            "selector": "ROW.querySelector(\".a-price .a-offscreen\")?.textContent?.trim() || ROW.querySelector(\"span.a-price-whole\")?.textContent?.trim() || \"\"",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "current_time",
            "selector": "new Date().toLocaleString()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "sleep-3",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3700,
      "position_y": 500,
      "config": {
        "duration": 2,
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 4060,
      "position_y": 500,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "text-contains-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-1",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "text-contains-1",
      "from_connector_id": "false",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-2",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-3",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-3",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 28,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 388,
      "position_y": 116,
      "width": 3560,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "wait-for-page-load-2",
          "wait-for-element-1",
          "sleep-3"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1468,
      "position_y": 116,
      "width": 2840,
      "height": 576,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "text-contains-1",
          "click-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 3268,
      "position_y": 396,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Amazon.in product listing scraper equivalent to the Octoparse Amazon India keyword template. It is preconfigured for the keyword \"lightning cable\" and navigates Amazon search result pages 1-20 using known page URLs. It extracts keyword, ASIN, title, detail page URL, star rating, review count, price, and current scrape time. Pagination uses navigate.urls plus loop-continue with append-mode CSV output. Amazon frequently serves anti-bot or Continue Shopping validation pages; this workflow detects the Continue Shopping text and clicks the validation button when present, but CAPTCHA/manual profile warm-up or compliant API access may still be required.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-text-contains-1",
      "element_type": "note",
      "title": "Note: Text Contains",
      "content": "Condition block: checks ``. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 1740,
      "position_y": 200,
      "width": 340,
      "height": 130,
      "z_index": 22,
      "data": {
        "block_id": "text-contains-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (keyword, asin, title, detail_page_url, star_rating). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 3540,
      "position_y": 480,
      "width": 340,
      "height": 130,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-1",
      "element_type": "note",
      "title": "Note: Loop Continue",
      "content": "Loop Continue advances a multi-URL or multi-text loop. Place at the end of the loop body with a clear back-edge to the loop start.",
      "color": "#ee5396",
      "position_x": 4260,
      "position_y": 480,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}