{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Brasil Classifieds & Real Estate Scraper",
    "description": "Collect OLX Brazil general classifieds and real estate listings, with pagination, duplicate suppression, optional detail pages and a maximum result count.",
    "version": "0.1",
    "x-build-id": "cl47qnX0VHddlCoKh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~olx-brasil-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-olx-brasil-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/automatic~olx-brasil-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-olx-brasil-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/automatic~olx-brasil-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-olx-brasil-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": {
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Search term. Leave empty to browse a category, state or search URL without a term; a fully empty input uses the example search bicicleta."
          },
          "category": {
            "title": "Category",
            "enum": [
              "all",
              "imoveis",
              "imoveis-rent",
              "imoveis-sale",
              "imoveis-vacation",
              "imoveis-land",
              "imoveis-commercial",
              "imoveis-new"
            ],
            "type": "string",
            "description": "General classifieds or an OLX Imóveis section. A search URL overrides this.",
            "default": "all"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "apartment",
              "house",
              "condo-house",
              "village-house",
              "penthouse",
              "duplex",
              "kitnet",
              "loft",
              "room"
            ],
            "type": "string",
            "description": "Optional OLX property type, with category Real estate for rent or for sale. 'room' (aluguel de quartos) is for rent only."
          },
          "state": {
            "title": "State (UF)",
            "enum": [
              "AC",
              "AL",
              "AP",
              "AM",
              "BA",
              "CE",
              "DF",
              "ES",
              "GO",
              "MA",
              "MT",
              "MS",
              "MG",
              "PA",
              "PB",
              "PR",
              "PE",
              "PI",
              "RJ",
              "RN",
              "RS",
              "RO",
              "RR",
              "SC",
              "SP",
              "SE",
              "TO"
            ],
            "type": "string",
            "description": "Optional Brazilian state. Shapes the search path and also filters returned rows."
          },
          "city": {
            "title": "City or region",
            "type": "string",
            "description": "Optional municipality inside the state, spelled as OLX spells it, for example 'São Paulo', 'Campinas' or 'Rio de Janeiro'. Requires state. OLX no longer has '... e Região' areas: a location OLX does not recognise ends the run with a clear message instead of collecting the whole state."
          },
          "neighborhood": {
            "title": "Neighbourhood (bairro)",
            "type": "string",
            "description": "Optional bairro inside the city, spelled as OLX spells it, for example 'Vila Mariana' or 'Pinheiros'. Requires city."
          },
          "priceMin": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "type": "number",
            "description": "Inclusive price constraint in BRL; also filters returned rows."
          },
          "priceMax": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "type": "number",
            "description": "Inclusive price constraint in BRL; also filters returned rows."
          },
          "minBedrooms": {
            "title": "Minimum bedrooms (quartos)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only listings with at least this many bedrooms. 5 means 5 or more."
          },
          "maxBedrooms": {
            "title": "Maximum bedrooms (quartos)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only listings with at most this many bedrooms. 5 means no upper limit."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms (banheiros)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only listings with at least this many bathrooms."
          },
          "minParkingSpaces": {
            "title": "Minimum parking spaces (vagas)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only listings with at least this many garage spaces."
          },
          "minAreaM2": {
            "title": "Minimum area (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only listings with at least this usable area."
          },
          "maxAreaM2": {
            "title": "Maximum area (m²)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Only listings with at most this usable area."
          },
          "publisherType": {
            "title": "Publisher",
            "enum": [
              "any",
              "private",
              "professional"
            ],
            "type": "string",
            "description": "Private owners (particular) or professionals such as agencies (profissional). Empty includes both."
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only listings posted or refreshed on OLX within this many days. Sorts newest first unless you pick another sort."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "newest",
              "price_asc"
            ],
            "type": "string",
            "description": "OLX sort order. Empty keeps OLX's own relevance order."
          },
          "searchUrl": {
            "title": "OLX search URL",
            "type": "string",
            "description": "OLX Brazil HTTPS search URL. Overrides the generated search path and query; state and price constraints still filter returned rows."
          },
          "searchUrls": {
            "title": "More OLX search URLs",
            "type": "array",
            "description": "Up to 20 OLX Brazil search URLs, collected one after another into one dataset. A listing found by two searches is delivered once. A link that is not an OLX search page is skipped and listed in OUTPUT. maxResults is the total for the run, shared fairly between the searches.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum unique listings to deliver for the whole run, up to 10,000. Rows are saved as they are found, so a run that ends early keeps everything it collected.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pages of 50 listings to read for each search, up to 100 (OLX shows at most 100 pages, about 5,000 listings, per search). Empty reads until maxResults."
          },
          "includeDetails": {
            "title": "Include detail pages",
            "type": "boolean",
            "description": "Request each detail page for extra public attributes such as postal code and description. Slower, uses one extra proxy request per row and adds a listing-details charge per row that got detail data.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Defaults to UNBLOCKER with no country or session. Other Apify groups were blocked in probes.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "UNBLOCKER"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}