{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Brasil Carros Data Scraper",
    "description": "Extracts public OLX Brasil vehicle listings with prices, FIPE references, vehicle attributes, photos, and descriptions.",
    "version": "1.2",
    "x-build-id": "8YOCxb7XJbLtdBwCP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~olx-cars-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-olx-cars-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/w3crawler~olx-cars-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-olx-cars-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/w3crawler~olx-cars-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-olx-cars-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",
        "required": [
          "state"
        ],
        "properties": {
          "state": {
            "title": "Brazilian 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": "Two-letter Brazilian state code.",
            "default": "sp"
          },
          "brand": {
            "title": "Brand",
            "maxLength": 80,
            "type": "string",
            "description": "Optional public vehicle brand filter."
          },
          "ps": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional lower price bound."
          },
          "pe": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional upper price bound."
          },
          "mileage_from": {
            "title": "Minimum mileage (km)",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Optional lower odometer bound."
          },
          "mileage_to": {
            "title": "Maximum mileage (km)",
            "minimum": 0,
            "maximum": 2000000,
            "type": "integer",
            "description": "Optional upper odometer bound."
          },
          "year_from": {
            "title": "Minimum year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional model year lower bound."
          },
          "year_to": {
            "title": "Maximum year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional model year upper bound."
          },
          "colors": {
            "title": "Colors",
            "maxItems": 10,
            "type": "array",
            "description": "Optional public color labels.",
            "items": {
              "type": "string",
              "enum": [
                "Preto",
                "Branco",
                "Prata",
                "Cinza",
                "Azul",
                "Vermelho",
                "Verde",
                "Amarelo",
                "Laranja",
                "Outra"
              ]
            }
          },
          "fpdll": {
            "title": "Below FIPE only",
            "type": "boolean",
            "description": "Ask OLX for listings below the FIPE reference where supported.",
            "default": false
          },
          "search": {
            "title": "Search text",
            "maxLength": 200,
            "type": "string",
            "description": "Optional free-text vehicle query."
          },
          "ads_limit": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound on vehicle records.",
            "default": 10
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Upper bound on result pages followed.",
            "default": 5
          },
          "deduplicate": {
            "title": "Deduplicate listings",
            "type": "boolean",
            "description": "Remove repeated listings across pages.",
            "default": true
          },
          "timeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 5000,
            "maximum": 60000,
            "type": "integer",
            "description": "Maximum time to wait for each public response.",
            "default": 30000
          },
          "maxBytes": {
            "title": "Maximum response bytes",
            "minimum": 1000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Safety limit for each public response.",
            "default": 5000000
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional bounded delay between public requests.",
            "default": 0
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Retry budget for transient public-request failures.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional standard Apify Proxy configuration. Proxy credentials are resolved by the SDK and never written to logs or dataset records.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "type": "boolean",
                "description": "Route ordinary public OLX requests through Apify Proxy when true."
              },
              "apifyProxyGroups": {
                "title": "Apify Proxy groups",
                "type": "array",
                "description": "Optional account-enabled Apify Proxy groups. Requires useApifyProxy=true.",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Apify Proxy country",
                "type": "string",
                "description": "Optional two-letter Apify Proxy country code. Requires useApifyProxy=true.",
                "pattern": "^[A-Za-z]{2}$"
              }
            },
            "additionalProperties": false
          },
          "fixturePath": {
            "title": "Explicit fixture path (QA only)",
            "maxLength": 260,
            "type": "string",
            "description": "Optional checked-in relative fixture for local validation; it never replaces a failed live request unless explicitly supplied."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}