{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Brazil Scraper - Listings, Prices, Cars & Leads",
    "description": "Scrape OLX Brazil (olx.com.br) classifieds & marketplace — cars, motorcycles, real estate, electronics, jobs & more. Get title, price, price drops, full typed specs, location, photos, seller name & dealer leads, market price reference + new-listing/price-drop monitoring. No login, key or browser.",
    "version": "0.1",
    "x-build-id": "rArqLoyPbiDlQzAui"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~olx-brazil-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-olx-brazil-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/scrapesage~olx-brazil-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-olx-brazil-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/scrapesage~olx-brazil-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-olx-brazil-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": {
          "query": {
            "title": "Search keyword",
            "type": "string",
            "description": "Keyword to search for, e.g. \"iphone 15\", \"civic 2020\", \"apartamento 2 quartos\". Combined with the category and state below. Leave empty to browse a whole category."
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "imoveis/venda",
              "imoveis/aluguel",
              "autos-e-pecas/carros-vans-e-utilitarios",
              "autos-e-pecas/motos",
              "eletronicos-e-celulares/celulares-e-telefonia/celulares",
              "eletronicos-e-celulares/computadores-e-acessorios",
              "eletronicos-e-celulares/videogames",
              "eletronicos-e-celulares/eletrodomesticos"
            ],
            "type": "string",
            "description": "OLX category to search. \"All of Brazil\" searches every category (use it with a keyword). Other options are verified leaf categories you can browse with or without a keyword. For any other category, paste its URL into Search URLs instead.",
            "default": ""
          },
          "state": {
            "title": "State (UF)",
            "type": "string",
            "description": "Optional 2-letter Brazilian state code to narrow results, e.g. \"sp\", \"rj\", \"mg\", \"ba\", \"rs\". Requires a category (not used for the \"All of Brazil\" option)."
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Paste OLX Brazil search or category URLs (filter on olx.com.br, then copy the URL). Most flexible way to target any category, region or filter combination. Each URL is paginated automatically.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "Listing URLs (detail mode)",
            "type": "array",
            "description": "Direct OLX ad URLs to extract full detail for (description, seller, specs, market price reference). Each is charged as a full detail record.",
            "items": {
              "type": "string"
            }
          },
          "priceMin": {
            "title": "Minimum price (BRL)",
            "type": "integer",
            "description": "Only return listings priced at or above this value (Brazilian Reais)."
          },
          "priceMax": {
            "title": "Maximum price (BRL)",
            "type": "integer",
            "description": "Only return listings priced at or below this value (Brazilian Reais)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest"
            ],
            "type": "string",
            "description": "Result ordering. \"Newest first\" is ideal for monitoring fresh listings; \"Most relevant\" is the OLX default.",
            "default": "relevance"
          },
          "professionalOnly": {
            "title": "Professional/dealer ads only",
            "type": "boolean",
            "description": "Keep only listings posted by professional sellers (dealerships, agencies, stores). Great for B2B lead generation.",
            "default": false
          },
          "withPhotosOnly": {
            "title": "Listings with photos only",
            "type": "boolean",
            "description": "Skip listings that have no photos.",
            "default": false
          },
          "includeListingDetails": {
            "title": "Include full listing details",
            "type": "boolean",
            "description": "Fetch each listing's detail page to add the full free-text description, complete photo set, seller name & ID, exact ZIP code, condition/inspection report and the OLX market price reference. One extra request per listing (charged as a detail record). Off by default for fast, cheap runs — search results are already rich.",
            "default": false
          },
          "outputSellerLeads": {
            "title": "Also output seller leads",
            "type": "boolean",
            "description": "After collecting listings, emit one deduplicated seller/dealer lead per seller with active-listing count, categories, price range, Google rating, profile URL and a 0-100 lead score.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listings to scrape across all searches in this run.",
            "default": 200
          },
          "maxResultsPerSearch": {
            "title": "Max results per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum listings to collect from each individual search/category URL before moving to the next.",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Remember listings across runs in a named key-value store and output only NEW listings and PRICE CHANGES. Combine with an Apify Schedule to build new-listing and price-drop alerts. Works independently of the scheduler.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that remembers seen listings between runs. Use a unique name per monitored search to keep their histories separate (lowercase letters, digits and hyphens).",
            "default": "olx-brazil-monitor"
          },
          "detectPriceChanges": {
            "title": "Detect price changes in monitor mode",
            "type": "boolean",
            "description": "When monitor mode is on, also re-emit a previously-seen listing when its price changes (monitorEvent = price_drop / price_rise), not just brand-new listings.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many detail pages render in parallel. Each parallel slot is its own anti-detect browser on its own residential IP, so keep it modest (2-4) for the best Cloudflare pass rate and memory headroom. Only used when 'Include full listing details' or 'Listing URLs' are set — search pages paginate on a single warmed browser.",
            "default": 4
          },
          "debugMode": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Save a few raw rendered pages to the run's key-value store (DEBUG_*) for troubleshooting. Leave off for normal runs.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. OLX Brazil blocks datacenter IPs — keep the default Apify RESIDENTIAL proxy with country BR. Required for reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "BR"
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Paste a list of URLs (one per line), OR one link to a .txt/.csv file, Google Sheet or Google Drive file containing them. Lets you import many Start URLs at once instead of typing each. Google Sheet/Drive share links are handled automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}