{
  "version": "1.0.0",
  "exported_at": "2026-06-01T00:00:00.000Z",
  "project": {
    "name": "Amazon Japan Product Listings Scraper cloud-only",
    "description": "Best-effort Amazon.co.jp keyword product listing scraper equivalent to the Octoparse cloud-only template. Starts with keyword 'kindle' on Amazon Japan search results, extracts site, delivery location, keyword, page number, product name, sponsored marker, product URL, ASIN, rating/ranking text, review count, review URL, current price, past price, and image URL. Pagination is implemented with a Next-button loop using a.s-pagination-next:not(.s-pagination-disabled) and appends all result pages into one CSV. Edit the navigate URL k= parameter to scrape a different keyword. Amazon may show CAPTCHA, anti-bot pages, localized availability, or address prompts.",
    "color": "bg-[#ff9900]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser viewport size",
      "position_x": 120,
      "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": 480,
      "position_y": 220,
      "config": {
        "url": "https://www.amazon.co.jp/s?k=kindle&page=1&language=en_US",
        "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": 840,
      "position_y": 220,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "selector": "div.s-main-slot div[data-component-type=\"s-search-result\"][data-asin]:not([data-asin=\"\"])",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "rowSelector": "div.s-main-slot div[data-component-type=\"s-search-result\"][data-asin]:not([data-asin=\"\"])",
        "fileName": "amazon-jp-product-listings-cloud-only-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "site",
            "selector": "location.hostname.replace(/^www\\./, '')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "deliver_to",
            "selector": "(() => { const el = document.querySelector('#glow-ingress-line2') || document.querySelector('#nav-global-location-slot'); return el ? el.innerText.replace(/\\s+/g, ' ').trim() : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "keyword",
            "selector": "(() => { const u = new URL(location.href); return u.searchParams.get('k') || u.searchParams.get('keywords') || ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "page_number",
            "selector": "(() => { const u = new URL(location.href); const fromUrl = u.searchParams.get('page'); const selected = document.querySelector('.s-pagination-selected'); return fromUrl || (selected ? selected.textContent.trim() : '1'); })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "product_name",
            "selector": "h2 span",
            "attribute": "text"
          },
          {
            "name": "sponsored",
            "selector": "(() => { const label = ROW.querySelector('.puis-sponsored-label-text, [aria-label=\"Sponsored\"], [aria-label=\"スポンサー\"]'); if (label) return label.textContent.trim() || label.getAttribute('aria-label') || 'Sponsored'; return /スポンサー|Sponsored/.test(ROW.innerText.slice(0, 600)) ? 'Sponsored' : ''; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "product_url",
            "selector": "h2 a",
            "attribute": "href"
          },
          {
            "name": "asin",
            "selector": "",
            "attribute": "data-asin"
          },
          {
            "name": "ranking",
            "selector": "i.a-icon-star-small span.a-icon-alt, i.a-icon-star span.a-icon-alt, span.a-icon-alt",
            "attribute": "text"
          },
          {
            "name": "review_count",
            "selector": "a[href*=\"#customerReviews\"] span.a-size-base, a[href*=\"customerReviews\"] span",
            "attribute": "text"
          },
          {
            "name": "review_url",
            "selector": "(() => { const a = ROW.querySelector('h2 a'); if (!a) return ''; const href = a.getAttribute('href') || ''; const abs = new URL(href, location.origin).href.split('#')[0]; return abs + '#customerReviews'; })()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "price",
            "selector": ".a-price:not(.a-text-price) .a-offscreen",
            "attribute": "text"
          },
          {
            "name": "past_price",
            "selector": ".a-price.a-text-price .a-offscreen, span.a-text-price .a-offscreen",
            "attribute": "text"
          },
          {
            "name": "image_url",
            "selector": "img.s-image",
            "attribute": "src"
          }
        ]
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "selector": "a.s-pagination-next:not(.s-pagination-disabled)",
        "color": "bg-[#ff832b]"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "selector": "a.s-pagination-next:not(.s-pagination-disabled)",
        "timeout": 20,
        "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": 2640,
      "position_y": 220,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3000,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#8d8d8d]"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 3000,
      "position_y": 560,
      "config": {
        "selector": "div.s-main-slot div[data-component-type=\"s-search-result\"][data-asin]:not([data-asin=\"\"])",
        "timeout": 45,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "end-1",
      "block_type": "output",
      "title": "End",
      "description": "Terminate execution flow",
      "position_x": 1920,
      "position_y": 560,
      "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": "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "end-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "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": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-2",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "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": 408,
      "position_y": 116,
      "width": 2840,
      "height": 636,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "wait-for-page-load-2",
          "sleep-1",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1488,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 1848,
      "position_y": 116,
      "width": 680,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1"
        ]
      }
    },
    {
      "id": "group-control",
      "element_type": "group",
      "title": "Control Flow",
      "color": "#8d8d8d",
      "position_x": 1848,
      "position_y": 456,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "end-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort Amazon.co.jp keyword product listing scraper equivalent to the Octoparse cloud-only template. Starts with keyword 'kindle' on Amazon Japan search results, extracts site, delivery location, keyword, page number, product name, sponsored marker, product URL, ASIN, rating/ranking text, review count, review URL, current price, past price, and image URL. Pagination is implemented with a Next-button loop using a.s-pagination-next:not(.s-pagination-disabled) and appends all result pages into one CSV. Edit the navigate URL k= parameter to scrape a different keyword. Amazon may show CAPTCHA, anti-bot pages, localized availability, or address prompts.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (site, deliver_to, keyword, page_number, sponsored). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 200,
      "width": 340,
      "height": 130,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `a.s-pagination-next:not(.s-pagination-disabled)`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 200,
      "width": 340,
      "height": 146,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-click-1",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-1"
      }
    },
    {
      "id": "note-amazon-limitations",
      "element_type": "note",
      "title": "Amazon Blocking Risk",
      "content": "Amazon may show CAPTCHA, bot-detection interstitials, region-specific availability, or address prompts. If rows do not load, run in a normal browser profile, reduce request rate, or use an appropriate proxy/session.",
      "color": "#da1e28",
      "position_x": 120,
      "position_y": 460,
      "width": 520,
      "height": 130,
      "z_index": 22,
      "block_id": null,
      "connection_id": null,
      "data": {
        "minimized": false
      }
    }
  ]
}