{
  "openapi": "3.0.1",
  "info": {
    "title": "Caminhões e Carretas Scraper: Trucks, Trailers & Dealers",
    "description": "Scrape Caminhões e Carretas, the Brazilian classifieds site for trucks, trailers, buses, tractors and machinery. Listings with price, year, mileage, make, model, city and photos, optional full details, dealer directory and make and model catalog. 59 fields, no login. Export CSV, Excel, JSON or XML.",
    "version": "0.1",
    "x-build-id": "8wv3Ja7YyjYenTceC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~caminhoesecarretas-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-caminhoesecarretas-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/recordsdata~caminhoesecarretas-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-caminhoesecarretas-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/recordsdata~caminhoesecarretas-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-caminhoesecarretas-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "vehicles",
              "dealers",
              "catalog"
            ],
            "type": "string",
            "description": "Vehicles: classified listings from filters or links. Dealers: the store directory by state, with address and opening hours. Catalog: the vehicle types and makes of the site (models too when a make is given).",
            "default": "vehicles"
          },
          "vehicleTypes": {
            "title": "Vehicle types",
            "type": "array",
            "description": "One or more vehicle classes, for example Truck, Trailer or Tractor. Leave empty to search all of them. In the catalog mode it limits the types listed.",
            "items": {
              "type": "string",
              "enum": [
                "caminhao",
                "carreta",
                "carroceria-sobre-chassi",
                "micro-onibus",
                "onibus",
                "utilitarios",
                "vans",
                "trator",
                "colheitadeira",
                "micro-trator",
                "implementos-agricolas",
                "forragem-e-feno",
                "distribuidor-autopropelido",
                "plataforma-colheitadeira",
                "plantadeira",
                "semeadeira",
                "pulverizador",
                "carro",
                "empilhadeira",
                "equipamentos",
                "escavadeira",
                "guindaste",
                "manipulador-telescopico",
                "maquinas",
                "mini-carregadeira",
                "mini-escavadeira",
                "moto",
                "quadriciclo",
                "motoniveladora",
                "motorhome",
                "nautico",
                "plataforma-elevatoria",
                "pa-carregadeira",
                "retro-escavadeira",
                "rolo-compactador",
                "trailer",
                "trator-esteira",
                "trator-skidder",
                "aviao",
                "florestal"
              ],
              "enumTitles": [
                "Truck",
                "Trailer",
                "Body on chassis",
                "Minibus",
                "Bus",
                "Utility vehicle",
                "Van",
                "Tractor",
                "Combine harvester",
                "Micro tractor",
                "Farm implement",
                "Forage and hay equipment",
                "Self-propelled spreader",
                "Harvester header",
                "Planter",
                "Seeder",
                "Sprayer",
                "Car",
                "Forklift",
                "Equipment",
                "Excavator",
                "Crane",
                "Telehandler",
                "Machinery",
                "Skid steer loader",
                "Mini excavator",
                "Motorcycle",
                "Quad bike",
                "Motor grader",
                "Motorhome",
                "Boat",
                "Aerial work platform",
                "Wheel loader",
                "Backhoe loader",
                "Roller compactor",
                "Camper trailer",
                "Crawler tractor",
                "Skidder",
                "Aircraft",
                "Forestry equipment"
              ]
            },
            "default": []
          },
          "makes": {
            "title": "Makes",
            "type": "array",
            "description": "Manufacturer names such as Scania, Volvo or Mercedes-Benz. Accents and case do not matter. Each make is looked up in the selected vehicle types. In the catalog mode a make also lists its models.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "Model names such as R 450 or FH 540. Needs at least one make. A model name matches every model of the make that contains it.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Brazilian states by two-letter code. Leave empty for the whole country. In the dealers mode it picks the states to list.",
            "items": {
              "type": "string",
              "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"
              ],
              "enumTitles": [
                "Acre (AC)",
                "Alagoas (AL)",
                "Amapá (AP)",
                "Amazonas (AM)",
                "Bahia (BA)",
                "Ceará (CE)",
                "Distrito Federal (DF)",
                "Espírito Santo (ES)",
                "Goiás (GO)",
                "Maranhão (MA)",
                "Mato Grosso (MT)",
                "Mato Grosso do Sul (MS)",
                "Minas Gerais (MG)",
                "Pará (PA)",
                "Paraíba (PB)",
                "Paraná (PR)",
                "Pernambuco (PE)",
                "Piauí (PI)",
                "Rio de Janeiro (RJ)",
                "Rio Grande do Norte (RN)",
                "Rio Grande do Sul (RS)",
                "Rondônia (RO)",
                "Roraima (RR)",
                "Santa Catarina (SC)",
                "São Paulo (SP)",
                "Sergipe (SE)",
                "Tocantins (TO)"
              ]
            },
            "default": []
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities written with their state, one per line, for example \"Campinas, SP\" or \"Curitiba, PR\".",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Keyword filter",
            "type": "array",
            "description": "Keep only listings whose make, model, city, color, body, seller or highlights contain all the words of a term. Each term is a separate filter and a listing needs to match any one of them. In the dealers mode a term filters the dealer names.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Links copied from www.caminhoesecarretas.com.br: a search or filtered listing page, one vehicle page, a store page or a dealer list (revendas.aspx). Filters set in this form are added to search links.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of rows to return across all searches. Free users are limited to 10 rows (preview). Paid users can raise it up to 1,000,000. A single site search stops at about 1,000 listings, so a large value splits the search by state, make, model, city, year and price.",
            "default": 10
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Oldest year of manufacture to keep, for example 2018."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Newest year of manufacture to keep, for example 2024."
          },
          "priceMin": {
            "title": "Minimum price (BRL)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Lowest asking price in Brazilian reais."
          },
          "priceMax": {
            "title": "Maximum price (BRL)",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Highest asking price in Brazilian reais."
          },
          "tractionConfig": {
            "title": "Traction (trucks)",
            "type": "string",
            "description": "Axle configuration of trucks, buses and similar types, for example Cavalo 6x2, Truck 6x4 or Toco 4x2. A short value such as 6x2 selects every option that contains it. Accents and case do not matter. Vehicle types without this option are skipped."
          },
          "bodyType": {
            "title": "Body type (trucks and trailers)",
            "type": "string",
            "description": "Body type, for example Baú Sider, Graneleiro or Tanque. A short value such as bau selects every option that contains it. Accents and case do not matter. Vehicle types without this option are skipped."
          },
          "sortBy": {
            "title": "Sort vehicles by",
            "enum": [
              "default",
              "recent",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Order of the results. Site default keeps the order the site shows. The site pins a few promoted listings at the top whatever the order, so the first rows may not follow it. Newest first is useful with Max Items.",
            "default": "default"
          },
          "fetchDetails": {
            "title": "Open each listing page",
            "type": "boolean",
            "description": "Open the page of every vehicle (or dealer) to add the full description, equipment list, manufacturer, chassis make, exact address and coordinates. Slower and returns the detailed record type. Off returns the search-card fields only.",
            "default": false
          },
          "includeContactDetails": {
            "title": "Include seller phone numbers",
            "type": "boolean",
            "description": "Add the public phone numbers of dealers. Off by default: phone numbers and e-mail addresses are also removed from descriptions. The sellers are businesses, but turn this on only if you have a lawful reason to hold contact data.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new records (monitor mode)",
            "type": "boolean",
            "description": "Only new records: skip every listing this same search already returned in an earlier run, so scheduled runs return just what changed and you are not charged for skipped records. Max Items then means N new records. Off by default.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Optional label for the monitor state. Use a different label to run several independent monitors with identical filters. Leave empty to share state between runs of the same search.",
            "default": ""
          },
          "resetSeen": {
            "title": "Reset seen records before this run",
            "type": "boolean",
            "description": "Clear the stored list of already-seen records for this search (and Monitor name) before the run starts, so everything counts as new again.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}