{
  "openapi": "3.0.1",
  "info": {
    "title": "MercadoLibre Chile Scraper - High Reliability",
    "description": "High-reliability MercadoLibre Chile scraper for mercadolibre.cl. Runs parallel worker shards with mission dedupe, Envio local filtering, local/import classification, CLP prices, VIP detail shipping/sold/quantity evidence, residential/custom proxies, retries, and cost/block guardrails.",
    "version": "0.1",
    "x-build-id": "98lQH5pFch1pafvI9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jchame~atomic-actor-1/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jchame-atomic-actor-1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jchame~atomic-actor-1/runs": {
      "post": {
        "operationId": "runs-sync-jchame-atomic-actor-1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jchame~atomic-actor-1/run-sync": {
      "post": {
        "operationId": "run-sync-jchame-atomic-actor-1",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "atomicMode": {
            "title": "Atomic mode",
            "enum": [
              "orchestrator",
              "worker"
            ],
            "type": "string",
            "description": "Use orchestrator for reliability fan-out on Apify cloud. Use worker only for direct single-shard runs or local debugging.",
            "default": "orchestrator"
          },
          "runMode": {
            "title": "Run mode",
            "enum": [
              "search",
              "item_detail"
            ],
            "type": "string",
            "description": "Use search for normal Atomic search-result extraction. Use item_detail for VIP detail mode over known item/catalog URLs.",
            "default": "search"
          },
          "childActorId": {
            "title": "Worker actor ID",
            "type": "string",
            "description": "Optional Apify actor ID to launch as child workers. Leave empty when Atomic is deployed and should call itself.",
            "default": ""
          },
          "childBuild": {
            "title": "Worker build tag",
            "type": "string",
            "description": "Optional build tag for child worker runs, such as experimental. Leave empty to use the actor default.",
            "default": ""
          },
          "maxConcurrentChildRuns": {
            "title": "Max concurrent worker runs",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How many child worker runs the orchestrator may run at once. Start moderate; 8-12 is the first recommended paid test range. Higher values depend on Apify account concurrency and proxy capacity.",
            "default": 8
          },
          "childMemoryMbytes": {
            "title": "Worker memory MB",
            "minimum": 512,
            "maximum": 8192,
            "type": "integer",
            "description": "Memory allocated to each child worker run.",
            "default": 2048
          },
          "childTimeoutSecs": {
            "title": "Worker timeout seconds",
            "minimum": 60,
            "maximum": 3600,
            "type": "integer",
            "description": "Timeout for each child worker run.",
            "default": 180
          },
          "maxShardRetries": {
            "title": "Retries per shard",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many fresh child worker attempts to try for a blocked or empty shard before marking it failed.",
            "default": 2
          },
          "maxAtomicShards": {
            "title": "Maximum shards",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum query/page/url shards planned by the orchestrator.",
            "default": 100
          },
          "targetRowsPerShard": {
            "title": "Rows per worker shard",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum rows each child worker should try to return.",
            "default": 60
          },
          "stopOnCostUsd": {
            "title": "Cost guardrail USD",
            "minimum": 0,
            "maximum": 10000,
            "type": "number",
            "description": "Stop launching new shards after estimated child-run cost reaches this amount. First paid stress default is 50 USD.",
            "default": 50
          },
          "stopOnBlockRate": {
            "title": "Block-rate guardrail",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Stop launching new shards if the completed-shard block rate rises above this ratio after the minimum sample size.",
            "default": 0.35
          },
          "minShardsForBlockRate": {
            "title": "Block-rate sample size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Minimum completed shards before the block-rate guardrail can stop the run.",
            "default": 20
          },
          "adaptiveCooldownMs": {
            "title": "Retry cooldown",
            "minimum": 0,
            "maximum": 300000,
            "type": "integer",
            "description": "Milliseconds to wait before retrying a failed or blocked shard with a fresh worker run.",
            "default": 15000
          },
          "adaptiveConcurrency": {
            "title": "Adaptive concurrency",
            "type": "boolean",
            "description": "Start with a lower worker count and ramp concurrency up or down based on hard-blocked shard rate.",
            "default": true
          },
          "initialConcurrentChildRuns": {
            "title": "Initial worker concurrency",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Worker count used at the start of an adaptive run before hard-block rate is known.",
            "default": 8
          },
          "concurrencyRampStep": {
            "title": "Concurrency ramp step",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many workers to add or remove when adaptive concurrency changes the current worker limit.",
            "default": 4
          },
          "concurrencyRampEveryShards": {
            "title": "Ramp sample interval",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Completed shard interval for considering a ramp-up when hard-block rate remains low.",
            "default": 10
          },
          "rampUpHardBlockRate": {
            "title": "Ramp-up hard-block rate",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Ramp up only when hard-blocked shard rate is at or below this ratio.",
            "default": 0.05
          },
          "rampDownHardBlockRate": {
            "title": "Ramp-down hard-block rate",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Ramp down when hard-blocked shard rate reaches or exceeds this ratio after the minimum sample size.",
            "default": 0.2
          },
          "fairQueryDistribution": {
            "title": "Fair query distribution",
            "type": "boolean",
            "description": "When multiple search queries are provided, enforce a fair per-query collection cap so one fast query cannot consume the entire run limit. Set maxItemsPerQuery to 0 to disable query caps entirely.",
            "default": true
          },
          "childCostFinalRefreshWaitMs": {
            "title": "Child cost settling max wait",
            "minimum": 0,
            "maximum": 180000,
            "type": "integer",
            "description": "Maximum milliseconds the parent spends polling finished child run billing from Apify until child cost totals stabilize. Increase for cleaner cost accounting; set to 0 for fastest runs.",
            "default": 60000
          },
          "orchestrationSearchOnly": {
            "title": "Search-only orchestration",
            "type": "boolean",
            "description": "Keep orchestrated child runs search-page-only. Recommended for the first reliability stress tests.",
            "default": true
          },
          "missionId": {
            "title": "Mission ID",
            "type": "string",
            "description": "Stable ID for a coordinated scrape mission. Runs with the same mission ID share shard claiming and item dedupe. Leave empty to derive one from the inputs.",
            "default": ""
          },
          "missionStorageNamespace": {
            "title": "Mission storage namespace",
            "type": "string",
            "description": "Prefix for the Apify Request Queue and Key-Value Store used by mission coordination.",
            "default": "atomic-actor-1"
          },
          "missionDedupeMode": {
            "title": "Mission dedupe mode",
            "enum": [
              "mission",
              "run",
              "off"
            ],
            "type": "string",
            "description": "mission skips item IDs already recorded by previous/current runs of the same mission. run dedupes only inside the current parent run. off disables persistent item dedupe.",
            "default": "mission"
          },
          "useMissionQueue": {
            "title": "Use mission shard queue",
            "type": "boolean",
            "description": "Use an Apify Request Queue so concurrent parent runs with the same mission ID do not claim the same query/page/url shard.",
            "default": true
          },
          "resumeMission": {
            "title": "Resume mission",
            "type": "boolean",
            "description": "When true, reuse the mission queue/store and continue unhandled work. When false, create a fresh storage scope for this run.",
            "default": true
          },
          "skipKnownItems": {
            "title": "Skip known mission items",
            "type": "boolean",
            "description": "When mission dedupe is enabled, skip item IDs already recorded in the mission Key-Value Store.",
            "default": true
          },
          "missionShardQueueName": {
            "title": "Mission shard queue name",
            "type": "string",
            "description": "Advanced override for the Apify Request Queue name. Leave empty unless coordinating external tooling.",
            "default": ""
          },
          "missionStateStoreName": {
            "title": "Mission state store name",
            "type": "string",
            "description": "Advanced override for the Apify Key-Value Store name. Leave empty unless coordinating external tooling.",
            "default": ""
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Product names or keywords to search on MercadoLibre Chile.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "MercadoLibre search URLs",
            "type": "array",
            "description": "Optional MercadoLibre Chile search/listing URLs. Direct product URLs are skipped in search mode. In runMode=item_detail, startUrls may be used as detail URLs if itemDetailUrls is empty.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "itemDetailUrls": {
            "title": "Item/catalog detail URLs",
            "type": "array",
            "description": "MercadoLibre Chile item or catalog product URLs to fetch when runMode=item_detail. Accepts articulo/producto URLs, including /p/ catalog URLs and URLs with wid=MLC item IDs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum unique search-card listings to save across all inputs.",
            "default": 60
          },
          "maxDetailPages": {
            "title": "Maximum detail pages",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum item/catalog detail URLs to fetch in runMode=item_detail. In orchestrator mode, each detail URL becomes a bounded worker shard.",
            "default": 10
          },
          "detailBrowserFirst": {
            "title": "Detail browser first",
            "type": "boolean",
            "description": "For item/catalog detail pages, skip plain HTML probes and go directly to Chromium when browser fallback is enabled. This usually reduces MercadoLibre challenge traffic on detail pages.",
            "default": true
          },
          "detailHtmlRetryCount": {
            "title": "Detail HTML retry count",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Plain-HTML attempts for item/catalog detail pages before browser rendering. Default is 0 because MercadoLibre detail pages commonly challenge plain HTML traffic.",
            "default": 0
          },
          "detailBrowserRetryCount": {
            "title": "Detail browser retry count",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Chromium retry budget for item/catalog detail pages with fresh proxy sessions. Higher values are more stubborn but slower and more expensive.",
            "default": 4
          },
          "detailBrowserWaitMs": {
            "title": "Detail browser wait time",
            "minimum": 500,
            "maximum": 15000,
            "type": "integer",
            "description": "Milliseconds to wait after detail-page browser navigation before parsing sold, quantity, catalog, and shipping evidence.",
            "default": 3000
          },
          "maxItemsPerQuery": {
            "title": "Maximum listings per query",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Optional per-query cap. Use 0 for no per-query cap.",
            "default": 60
          },
          "maxPagesPerQuery": {
            "title": "Maximum search pages per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many public search-result pages to read for each query. One page is usually enough for market evidence and URL samples.",
            "default": 1
          },
          "searchFilterMode": {
            "title": "Search filter mode",
            "enum": [
              "default",
              "envio_local"
            ],
            "type": "string",
            "description": "Choose default to scrape the normal search page. Choose Envio local to have each worker load MercadoLibre's Productos con envio nacional / Envio local filtered page and save only rows from that filtered search page.",
            "default": "default"
          },
          "localOnly": {
            "title": "Local stock only",
            "type": "boolean",
            "description": "Shortcut for searchFilterMode=envio_local. When enabled, Atomic returns only rows from MercadoLibre's Envio local filtered search pages when that filter is available.",
            "default": false
          },
          "htmlRetryCount": {
            "title": "HTML retry count",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Extra plain-HTML attempts for each search page before browser fallback.",
            "default": 2
          },
          "browserFallback": {
            "title": "Use browser fallback",
            "type": "boolean",
            "description": "Render search pages in Chromium when plain HTML is blocked or incomplete. Recommended for MercadoLibre.",
            "default": true
          },
          "browserWaitMs": {
            "title": "Browser wait time",
            "minimum": 500,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait after browser navigation before parsing search cards and filters.",
            "default": 2500
          },
          "browserRetryCount": {
            "title": "Browser retry count",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Browser retry budget with session rotation when MercadoLibre returns a security or bot-check page.",
            "default": 3
          },
          "requestDelayMs": {
            "title": "Request delay",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Base delay between search-page requests in milliseconds.",
            "default": 700
          },
          "requestJitterMs": {
            "title": "Request jitter",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum random extra delay added to each request.",
            "default": 1200
          },
          "includeRaw": {
            "title": "Include raw snippets",
            "type": "boolean",
            "description": "Include compact parser/debug snippets in the dataset. Off keeps the output lean.",
            "default": false
          },
          "sellerEnrichmentMode": {
            "title": "Seller enrichment mode",
            "enum": [
              "off",
              "local_only"
            ],
            "type": "string",
            "description": "Optional seller/detail enrichment. Use local_only to open bounded item detail pages only for listings classified as local Chile stock.",
            "default": "off"
          },
          "includeSellerDetails": {
            "title": "Include seller details",
            "type": "boolean",
            "description": "Compatibility alias for sellerEnrichmentMode=local_only.",
            "default": false
          },
          "maxSellerDetailPages": {
            "title": "Maximum item detail pages",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum local item detail pages to open when seller enrichment is enabled.",
            "default": 10
          },
          "maxSellerProfilePages": {
            "title": "Maximum seller profile pages",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum seller profile pages to open when seller enrichment is enabled. Seller profile results are cached by seller identity.",
            "default": 10
          },
          "failOnBlockedNoItems": {
            "title": "Fail when blocked with no listings",
            "type": "boolean",
            "description": "Fail the run when MercadoLibre blocks all attempted search pages and no listings are saved.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Default is Apify Residential Chile. You can also use Apify Console's custom proxy URLs here for an external paid proxy pool.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "CL"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}