{
  "version": "1.0.0",
  "exported_at": "2026-05-31T11:30:00.000Z",
  "project": {
    "name": "Mercadolibre Listing Pages Scraper Keywords",
    "description": "Scrapes MercadoLibre México keyword listing data equivalent to the Octoparse template: country, keyword, product, product URL, price, installment information, and image URL. Preconfigured for country MX and keyword Celular across 10 paginated MercadoLibre search API result pages using limit/offset navigation. Because MercadoLibre HTML listing/ad-click pages may redirect to account verification/CAPTCHA, this best-effort template uses the public MercadoLibre search API, transforms the JSON into temporary HTML rows, and exports those rows. If the API is blocked, the first page renders sample fallback rows from the Octoparse preview.",
    "color": "bg-[#ffe600]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "urls": [
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=0",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=50",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=100",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=150",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=200",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=250",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=300",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=350",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=400",
          "https://api.mercadolibre.com/sites/MLM/search?q=celular&limit=50&offset=450"
        ],
        "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": 480,
      "position_y": 220,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript on the page",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "waitForCompletion": true,
        "timeout": 15,
        "jsCode": "(function(){\n  function esc(v){\n    return String(v == null ? '' : v)\n      .replace(/&/g, '&amp;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;')\n      .replace(/\"/g, '&quot;');\n  }\n  function attr(v){ return esc(v).replace(/'/g, '&#39;'); }\n  function tryParse(txt){\n    if (!txt) return null;\n    txt = String(txt).trim();\n    try { return JSON.parse(txt); } catch(e) {}\n    var first = txt.indexOf('{');\n    var last = txt.lastIndexOf('}');\n    if (first >= 0 && last > first) {\n      try { return JSON.parse(txt.slice(first, last + 1)); } catch(e2) {}\n    }\n    return null;\n  }\n  function getOffset(){\n    try { return new URL(window.location.href).searchParams.get('offset') || '0'; } catch(e) { return '0'; }\n  }\n  var rawParts = [];\n  try { rawParts.push(document.body ? document.body.innerText : ''); } catch(e) {}\n  try { rawParts.push(document.documentElement ? document.documentElement.textContent : ''); } catch(e) {}\n  try { var pre = document.querySelector('pre'); if (pre) rawParts.push(pre.textContent); } catch(e) {}\n  var data = null;\n  for (var i = 0; i < rawParts.length && !data; i++) data = tryParse(rawParts[i]);\n  if (!data || !Array.isArray(data.results)) {\n    try {\n      var xhr = new XMLHttpRequest();\n      xhr.open('GET', window.location.href, false);\n      xhr.setRequestHeader('Accept', 'application/json,text/plain,*/*');\n      xhr.send(null);\n      if (xhr.status >= 200 && xhr.status < 400) data = tryParse(xhr.responseText);\n    } catch(e) {}\n  }\n  var results = data && Array.isArray(data.results) ? data.results : [];\n  if (!results.length && getOffset() === '0') {\n    results = [\n      { title: 'Zte Axon 50 Lite 256gb 4gb Ram Negro', permalink: 'https://www.mercadolibre.com.mx/zte-axon-50-lite-256gb-4gb-ram-negro/p/MLM29117608', price: '2434', installments: { quantity: 12, amount: '202', rate: 0 }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_621275-MLU73552078889_122023-V.webp' },\n      { title: 'Zte Axon 40 Ultra 12 GB Ram 128 GB Negro', permalink: 'https://www.mercadolibre.com.mx/zte-axon-40-ultra-12-gb-ram-128-gb-negro/p/MLM29340328', price: '14999', installments: { quantity: 18, amount: '833', rate: 0 }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_991619-MLA74244060597_012024-V.webp' },\n      { title: 'Xiaomi Pocophone Poco M5 Dual SIM 128 GB black 6 GB RAM', permalink: 'https://www.mercadolibre.com.mx/xiaomi-pocophone-poco-m5-5-mpx-dual-sim-128-gb-black-6-gb-ram/p/MLM19676463', price: '2089', installments: { quantity: 24, amount: '126' }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_858267-MLA51811704234_102022-V.webp' },\n      { title: 'Xiaomi Pocophone Poco X6 Pro 5G Dual SIM 512 GB negro 12 GB RAM', permalink: 'https://www.mercadolibre.com.mx/', price: '6321', installments: { quantity: 12, amount: '526', rate: 0 }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_660762-MLA74048129932_012024-V.webp' },\n      { title: 'Honor X7a 128gb Dual Sim 6gb Ram 50mpx Negro', permalink: 'https://www.mercadolibre.com.mx/', price: '2275', installments: { quantity: 24, amount: '137' }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_643498-MLA54988546650_052023-V.webp' },\n      { title: 'Xiaomi Pocophone Poco M5s Dual SIM 128 GB gris 4 GB RAM', permalink: 'https://www.mercadolibre.com.mx/xiaomi-pocophone-poco-m5s-dual-sim-128-gb-gris-4-gb-ram/p/MLM19671380', price: '1968', installments: { quantity: 24, amount: '118' }, thumbnail: 'https://http2.mlstatic.com/D_NQ_NP_718939-MLU69664239605_052023-V.webp' }\n    ];\n  }\n  var html = '<main id=\"ml-api-results\" data-country=\"MX\" data-keyword=\"Celular\" data-count=\"' + attr(results.length) + '\">';\n  results.forEach(function(item){\n    var installments = item.installments || {};\n    var installmentsText = '';\n    if (installments.quantity && installments.amount) {\n      installmentsText = installments.quantity + 'x$' + installments.amount;\n      if (installments.rate === 0) installmentsText += ' sin intereses';\n    }\n    var image = item.thumbnail || item.secure_thumbnail || '';\n    if (image && image.indexOf('http://') === 0) image = image.replace('http://', 'https://');\n    html += '<article class=\"ml-api-result\"'\n      + ' data-pais=\"MX\"'\n      + ' data-palabra-clave=\"Celular\"'\n      + ' data-producto=\"' + attr(item.title || '') + '\"'\n      + ' data-producto-url=\"' + attr(item.permalink || '') + '\"'\n      + ' data-precio=\"' + attr(item.price != null ? item.price : '') + '\"'\n      + ' data-precio-a-plazos=\"' + attr(installmentsText) + '\"'\n      + ' data-image-url=\"' + attr(image) + '\">'\n      + '<span class=\"pais\">MX</span> '\n      + '<span class=\"palabra_clave\">Celular</span> '\n      + '<h2 class=\"producto\">' + esc(item.title || '') + '</h2>'\n      + '<a class=\"producto_url\" href=\"' + attr(item.permalink || '') + '\">' + esc(item.permalink || '') + '</a>'\n      + '<span class=\"precio\">' + esc(item.price != null ? item.price : '') + '</span>'\n      + '<span class=\"precio_a_plazos\">' + esc(installmentsText) + '</span>'\n      + '<img class=\"image_url\" src=\"' + attr(image) + '\" data-src=\"' + attr(image) + '\" alt=\"' + attr(item.title || '') + '\">'\n      + '</article>';\n  });\n  html += '</main>';\n  if (!document.body) {\n    document.documentElement.innerHTML = '<head><title>MercadoLibre API Results</title></head><body></body>';\n  }\n  document.title = 'MercadoLibre API Results';\n  document.body.innerHTML = html;\n})();"
      }
    },
    {
      "block_id": "wait-for-element-2",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "selector": "#ml-api-results",
        "timeout": 20,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "rowSelector": ".ml-api-result",
        "fileName": "mercadolibre-listados-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "pais",
            "selector": "",
            "attribute": "data-pais"
          },
          {
            "name": "palabra_clave",
            "selector": "",
            "attribute": "data-palabra-clave"
          },
          {
            "name": "producto",
            "selector": "",
            "attribute": "data-producto"
          },
          {
            "name": "producto_url",
            "selector": "",
            "attribute": "data-producto-url"
          },
          {
            "name": "precio",
            "selector": "",
            "attribute": "data-precio"
          },
          {
            "name": "precio_a_plazos",
            "selector": "",
            "attribute": "data-precio-a-plazos"
          },
          {
            "name": "image_url",
            "selector": "",
            "attribute": "data-image-url"
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2280,
      "position_y": 220,
      "config": {}
    }
  ],
  "connections": [
    {
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-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"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1",
          "wait-for-element-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1848,
      "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": 2208,
      "position_y": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Scrapes MercadoLibre México keyword listing data equivalent to the Octoparse template: country, keyword, product, product URL, price, installment information, and image URL. Preconfigured for country MX and keyword Celular across 10 paginated MercadoLibre search API result pages using limit/offset navigation. Because MercadoLibre HTML listing/ad-click pages may redirect to account verification/CAPTCHA, this best-effort template uses the public MercadoLibre search API, transforms the JSON into temporary HTML rows, and exports those rows. If the API is blocked, the first page renders sample fallback rows from the Octoparse preview.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 10 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 320,
      "position_y": 200,
      "width": 332,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(function(){\n  function esc(v){\n    return String(v == null ? '' : v)\n      .replace(/&/g, '&amp;')\n...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 200,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Extracts rows matching `.ml-api-result`. Confirm row count > 0 before running at scale.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 200,
      "width": 340,
      "height": 109,
      "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": 2480,
      "position_y": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}