{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Brazil Scraper API",
    "description": "Scrape classified listings from olx.com.br. Read search or category pages, one row per listing. Each row has the id, title, price in BRL and category. You also get city and state, publish date and image URLs. The row says if the seller is private or a business. $0.85 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "MICVAaiu5iZlJ2r20"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~olx-brazil-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-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/dami_studio~olx-brazil-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-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/dami_studio~olx-brazil-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-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": {
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "What to look for on olx.com.br, one term per line. OLX is a Brazilian site, so Portuguese terms return the most (\"iphone\", \"notebook\", \"bicicleta aro 29\", \"apartamento 2 quartos\").",
            "items": {
              "type": "string"
            }
          },
          "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. Limit the search to one Brazilian state. Accepts the two-letter code (\"SP\", \"RJ\", \"MG\") or the full name (\"Sao Paulo\"). Leave empty to search all of Brazil.",
            "default": ""
          },
          "region": {
            "title": "Region or city (optional)",
            "type": "string",
            "description": "Optional. Narrows the search inside the state, using the region slug OLX shows in its own URLs, for example \"sao-paulo-e-regiao\", \"rio-de-janeiro-e-regiao\". Requires a state; ignored without one. OLX silently returns the whole state for a slug it does not recognise, so this Actor checks and adds one uncharged warning row listing the slugs that would have worked. Leave empty for the whole state."
          },
          "category": {
            "title": "Category (optional)",
            "enum": [
              "",
              "celulares",
              "eletronicos-e-celulares",
              "informatica",
              "computadores-e-acessorios",
              "games",
              "videogames",
              "tvs-e-video",
              "audio",
              "cameras-e-drones",
              "imoveis",
              "imoveis/venda",
              "imoveis/aluguel",
              "autos-e-pecas",
              "autos-e-pecas/carros-vans-e-utilitarios",
              "autos-e-pecas/motos",
              "para-a-sua-casa",
              "moveis",
              "eletrodomesticos",
              "eletro",
              "esportes-e-lazer",
              "ciclismo",
              "moda-e-beleza",
              "artigos-infantis",
              "animais-de-estimacao",
              "musica-e-hobbies",
              "instrumentos-musicais",
              "agro-e-industria",
              "comercio-e-escritorio",
              "servicos",
              "materiais-de-construcao"
            ],
            "type": "string",
            "description": "Optional OLX category path. Pick one here, or type any path you see in an OLX URL (for example \"imoveis/venda\" or \"autos-e-pecas/carros-vans-e-utilitarios\").",
            "default": ""
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on rows returned across all searches (1-5000). You are charged per listing returned. OLX serves about 50 listings per page and stops paginating after page 100, so one search tops out near 5000 listings.",
            "default": 50
          },
          "startUrls": {
            "title": "OLX search URLs",
            "type": "array",
            "description": "Optional. Paste OLX search or category result pages and every filter already on the URL is kept, for example https://www.olx.com.br/celulares/estado-sp?q=iphone&ps=1000&pe=3000 . Works alongside the fields above. Single listing pages are not supported.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date",
              "price_asc"
            ],
            "type": "string",
            "description": "How OLX orders the results. \"Newest first\" is the one to use for monitoring new listings.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only return listings priced at or above this, in Brazilian reais."
          },
          "maxPrice": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only return listings priced at or below this, in Brazilian reais."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Leave this alone unless you need the run to go out through a particular network. Your own proxy servers are used exactly as given."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}