{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Autos Scraper",
    "description": "Scrape OLX Brasil car and motorcycle listings: type a make or model with filters, or paste any search or ad URL. Specs, price, photos and location; add-ons for ad details with FIPE and market prices, and the seller with phone.",
    "version": "0.5",
    "x-build-id": "ws8FPpybwL5IHxYNk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ribtools~olxautos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ribtools-olxautos-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/ribtools~olxautos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ribtools-olxautos-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/ribtools~olxautos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ribtools-olxautos-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": {
          "vehicles": {
            "title": "Search vehicles",
            "type": "array",
            "description": "Type it the way you would in OLX's search box: a make (`vw`), a model (`Tiguan`) or both (`Chevrolet Onix`). One per line, each becomes its own search. Spelling is matched against OLX's own catalog, so `cherry` finds Chery. For motorcycles (`Honda CG`), set Vehicle type below. Leave empty if you only paste URLs below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "OLX URLs",
            "type": "array",
            "description": "OLX search URLs for cars (`/autos-e-pecas/carros-vans-e-utilitarios`) or motorcycles (`/autos-e-pecas/motos`) copied from your browser, with any filters applied (state, city, brand, price, keyword). Single ad URLs also work, e.g. `https://www.olx.com.br/vi/1521837213` or the full regional ad link. A URL keeps exactly the filters it carries.",
            "items": {
              "type": "string"
            }
          },
          "maxRequests": {
            "title": "Max results per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of vehicles for each vehicle and each URL above. Each result is a charged event. Default 10. OLX shows at most 5,000 vehicles (100 pages) per search; narrow the filters for more.",
            "default": 10
          },
          "vehicleType": {
            "title": "Vehicle type",
            "enum": [
              "car",
              "bike"
            ],
            "type": "string",
            "description": "Cars or motorcycles. Applies to the vehicles typed above.",
            "default": "car"
          },
          "state": {
            "title": "State",
            "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": "Brazilian state (UF). Leave empty to search the whole country."
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Oldest model year to include. 1950 stands for 1950 or older, as on OLX."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1950,
            "maximum": 2030,
            "type": "integer",
            "description": "Newest model year to include. Leave empty for no upper limit. 1950 stands for 1950 or older, as on OLX."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "dealer",
              "private"
            ],
            "type": "string",
            "description": "Dealers (stores and franchised dealerships), private sellers, or both.",
            "default": "all"
          },
          "priceFrom": {
            "title": "Price from (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest asking price to include, in reais."
          },
          "priceTo": {
            "title": "Price to (R$)",
            "minimum": 1,
            "type": "integer",
            "description": "Highest asking price to include, in reais: 1 or more (no vehicle is listed at 0)."
          },
          "kmFrom": {
            "title": "Mileage from (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest mileage to include."
          },
          "kmTo": {
            "title": "Mileage to (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Highest mileage to include: 1 km or more."
          },
          "detailsAddon": {
            "title": "Fetch ad details (add-on)",
            "type": "boolean",
            "description": "Open each ad page to add the description, FIPE reference price, OLX market price statistics, ZIP code, seller name and masked phone. Charged per vehicle with details.",
            "default": false
          },
          "sellerDataAddon": {
            "title": "Fetch seller data (add-on)",
            "type": "boolean",
            "description": "Fetch the seller profile: name, phone number, location, pro/dealer flags, Google rating and benefits. You are charged only when a phone number is returned.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}