{
  "openapi": "3.0.1",
  "info": {
    "title": "MercadoLibre Inmuebles Scraper for Mexico",
    "description": "Scrape MercadoLibre Mexico real estate (inmuebles) from simple filters or search URLs. Extract MXN to USD prices, price per m² vs colonia median, cheap/fair/expensive deal labels, rental yield, a market report, and monitor mode for new, removed and price-drop listings. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "nA7MrJw1lhLZztrxn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kareninatech~mercadolibre-inmuebles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kareninatech-mercadolibre-inmuebles-scraper",
        "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/kareninatech~mercadolibre-inmuebles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kareninatech-mercadolibre-inmuebles-scraper",
        "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/kareninatech~mercadolibre-inmuebles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kareninatech-mercadolibre-inmuebles-scraper",
        "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": {
          "operation": {
            "title": "Operation",
            "enum": [
              "venta",
              "renta"
            ],
            "type": "string",
            "description": "Buy (venta) or rent (renta). Ignored when you paste a search URL.",
            "default": "venta"
          },
          "property_type": {
            "title": "Property type",
            "enum": [
              "departamentos",
              "casas",
              "inmuebles",
              "terrenos",
              "oficinas",
              "locales-comerciales",
              "bodegas"
            ],
            "type": "string",
            "description": "Same categories as on MercadoLibre. 'All property types' mixes homes, land and commercial. Ignored when you paste a search URL.",
            "default": "departamentos"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Plain names work: CDMX, Mexico City, Guadalajara, Zapopan, Monterrey, Cancún, Mérida, Querétaro, Jalisco, Nuevo León, Estado de México, or a CDMX alcaldía like Benito Juárez. You can also paste a MercadoLibre location path like jalisco/zapopan.",
            "default": "CDMX"
          },
          "locations": {
            "title": "More locations",
            "type": "array",
            "description": "Optional. Search several places in one run with the same filters. max_items is shared between them.",
            "items": {
              "type": "string"
            }
          },
          "min_price": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in the currency below. For rentals this is the monthly rent."
          },
          "max_price": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in the currency chosen below, for example 3500000. Leave empty for no maximum."
          },
          "price_currency": {
            "title": "Price filter currency",
            "enum": [
              "MXN",
              "USD"
            ],
            "type": "string",
            "description": "Currency for the min/max price filters, for example MXN or USD.",
            "default": "MXN"
          },
          "min_m2": {
            "title": "Min built m²",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum built surface (m² construidos), for example 50."
          },
          "max_m2": {
            "title": "Max built m²",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum built surface (m² construidos), for example 200."
          },
          "min_bedrooms": {
            "title": "Min bedrooms (recámaras)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bedrooms, for example 2. Leave empty for no minimum."
          },
          "min_bathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bathrooms, for example 1. Leave empty for no minimum."
          },
          "seller_type": {
            "title": "Seller type",
            "enum": [
              "",
              "agency",
              "private"
            ],
            "type": "string",
            "description": "Only agencies (inmobiliaria) or only private owners (trato directo). When set, every row gets this seller_type.",
            "default": ""
          },
          "listing_kind": {
            "title": "Listing kind",
            "enum": [
              "",
              "individual",
              "development"
            ],
            "type": "string",
            "description": "Individual properties or new developments (desarrollos).",
            "default": ""
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Sort order of the results. Leave empty to keep the site's default order.",
            "default": ""
          },
          "search_url": {
            "title": "Search URL (optional)",
            "type": "string",
            "description": "Optional. Paste a MercadoLibre Mexico search URL after filtering on the site, for example https://inmuebles.mercadolibre.com.mx/departamentos/venta/distrito-federal/ . It overrides the filters above. Mexico only for now."
          },
          "start_urls": {
            "title": "Extra search URLs",
            "type": "array",
            "description": "Optional. More MercadoLibre Mexico search URLs to scrape in the same run.",
            "items": {
              "type": "string"
            }
          },
          "max_items": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum listings to save (one page has 48). MercadoLibre shows at most about 2,000 per search, so split big searches by alcaldía or price.",
            "default": 48
          },
          "max_pages": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 42,
            "type": "integer",
            "description": "Optional page limit per search (48 listings per page, site limit 42)."
          },
          "compare_with_zone": {
            "title": "Compare price per m² with the zone",
            "type": "boolean",
            "description": "Adds the colonia (or alcaldía/municipality) median price per m², price_vs_zone_pct and a cheap / fair / expensive deal_label. Needs at least 5 listings in the zone.",
            "default": true
          },
          "estimate_rental_yield": {
            "title": "Estimate rental yield",
            "type": "boolean",
            "description": "For sale searches, also reads a few rent pages for the same type and place and adds estimated monthly rent and gross yield %.",
            "default": true
          },
          "yield_sample_pages": {
            "title": "Rent sample pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many rent pages (48 each) to sample for yield. More pages = better medians, slightly longer run.",
            "default": 2
          },
          "monitor_mode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Remembers listings between runs and saves only new or price-changed listings, with previous_price and price_drop_pct. Schedule it daily to track a market.",
            "default": false
          },
          "monitor_key": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for the monitor memory. Use a different name for each search you want to track separately.",
            "default": "default"
          },
          "emit_removed": {
            "title": "Also save removed listings",
            "type": "boolean",
            "description": "Adds rows with monitor_status = removed for listings that disappeared. Only works when max_items covers the whole search.",
            "default": false
          },
          "fetch_details": {
            "title": "Open each listing page (slower)",
            "type": "boolean",
            "description": "Adds coordinates, all photos, full description and the specs table. Off by default. If a page is blocked, the search-card data is still saved.",
            "default": false
          },
          "max_detail_pages": {
            "title": "Max listing pages to open",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Limit for listing pages opened when the option above is on.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "MercadoLibre blocks datacenter IPs, so the default is Apify Proxy RESIDENTIAL in Mexico. If you choose no proxy or a datacenter proxy and get blocked, the Actor switches to RESIDENTIAL MX automatically.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "MX"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}