{
  "openapi": "3.0.1",
  "info": {
    "title": "Autosphere.fr Scraper",
    "description": "Scrape used & demo cars from autosphere.fr (France): prices, promotions, LOA/credit offers, specs, equipment, EV battery data and dealer locations. Public API, no browser.",
    "version": "0.1",
    "x-build-id": "aqdmd8B8ucwVezoVC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~autosphere-fr-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-autosphere-fr-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/rastriq~autosphere-fr-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-autosphere-fr-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/rastriq~autosphere-fr-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-autosphere-fr-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": {
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brand names as shown on autosphere.fr, case-insensitive (e.g. <code>Renault</code>, <code>Peugeot</code>, <code>Land-Rover</code>, <code>Alfa Romeo</code>). Empty = all brands.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "Models",
            "type": "array",
            "description": "Model names (e.g. <code>Clio</code>, <code>3008</code>). Combine with Brands for precise results.",
            "items": {
              "type": "string"
            }
          },
          "vehicleTypes": {
            "title": "Vehicle condition",
            "enum": [
              "all",
              "vo",
              "vd"
            ],
            "type": "string",
            "description": "Used cars (VO), demonstration cars (VD) or both.",
            "default": "all"
          },
          "fuelTypes": {
            "title": "Fuel types",
            "type": "array",
            "description": "Empty = all fuels.",
            "items": {
              "type": "string",
              "enum": [
                "Essence",
                "Diesel",
                "Hybride",
                "Essence micro hybride",
                "Diesel micro hybride",
                "Hybride rechargeable",
                "Electrique",
                "Gpl",
                "Essence bioéthanol"
              ],
              "enumTitles": [
                "Petrol",
                "Diesel",
                "Hybrid",
                "Petrol mild-hybrid",
                "Diesel mild-hybrid",
                "Plug-in hybrid",
                "Electric",
                "LPG",
                "Petrol / E85 bioethanol"
              ]
            }
          },
          "bodyTypes": {
            "title": "Body types",
            "type": "array",
            "description": "Empty = all body types.",
            "items": {
              "type": "string",
              "enum": [
                "Citadine",
                "SUV",
                "Berline",
                "Break",
                "Monospace",
                "Coupé",
                "Cabriolet",
                "Coupé Cabriolet",
                "4x4 Tout Terrain",
                "Utilitaire",
                "Sans Permis"
              ],
              "enumTitles": [
                "City car",
                "SUV",
                "Sedan / hatchback",
                "Estate",
                "MPV",
                "Coupé",
                "Convertible",
                "Coupé-convertible",
                "4x4 off-road",
                "Van / LCV",
                "Licence-free car"
              ]
            }
          },
          "gearbox": {
            "title": "Gearbox",
            "enum": [
              "any",
              "Automatique",
              "Manuelle"
            ],
            "type": "string",
            "description": "Transmission type.",
            "default": "any"
          },
          "colors": {
            "title": "Exterior colours",
            "type": "array",
            "description": "Empty = all colours.",
            "items": {
              "type": "string",
              "enum": [
                "Blanc",
                "Noir",
                "Gris",
                "Bleu",
                "Rouge",
                "Vert",
                "Jaune",
                "Orange",
                "Brun",
                "Beige",
                "Violet",
                "Bi-ton"
              ],
              "enumTitles": [
                "White",
                "Black",
                "Grey",
                "Blue",
                "Red",
                "Green",
                "Yellow",
                "Orange",
                "Brown",
                "Beige",
                "Purple",
                "Two-tone"
              ]
            }
          },
          "minPrice": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower price bound."
          },
          "maxPrice": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound."
          },
          "minMileage": {
            "title": "Min mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower mileage bound."
          },
          "maxMileage": {
            "title": "Max mileage (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper mileage bound."
          },
          "minYear": {
            "title": "First registered from (year)",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest first-registration year."
          },
          "maxYear": {
            "title": "First registered until (year)",
            "minimum": 1950,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest first-registration year."
          },
          "minMonthlyPayment": {
            "title": "Min monthly payment (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter by advertised LOA/credit monthly payment."
          },
          "maxMonthlyPayment": {
            "title": "Max monthly payment (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter by advertised LOA/credit monthly payment."
          },
          "firstHandOnly": {
            "title": "First-owner cars only",
            "type": "boolean",
            "description": "Only vehicles with a single previous owner.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "popularity",
              "price_asc",
              "price_desc",
              "mileage_asc",
              "mileage_desc",
              "year_desc",
              "year_asc"
            ],
            "type": "string",
            "description": "Order of results. Useful with Max items (e.g. the 100 cheapest EVs). For full exports keep <i>Popularity</i>, the only order verified to return every car exactly once.",
            "default": "popularity"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of vehicles. Empty or 0 = all matching vehicles."
          },
          "includeDetails": {
            "title": "Include vehicle details",
            "type": "boolean",
            "description": "Open each vehicle page to add ~40 fields: body type, colour, doors, seats, real power, weight, dimensions, consumption, Crit'Air, EV battery capacity & health, full equipment list, damages count, history report link, previous use, and the selling dealer (name, address, postal code, GPS). One extra request per car.",
            "default": false
          },
          "includeImages": {
            "title": "Include all photo URLs",
            "type": "boolean",
            "description": "Add the full gallery (<code>imageUrls</code>, up to 30 per car). The main photo is always included.",
            "default": false
          },
          "includeLicensePlate": {
            "title": "Include licence plates",
            "type": "boolean",
            "description": "Off by default. When on, adds <code>licensePlate</code> (and damage photo URLs if details + images are on, as they contain the plate).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency (details)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel vehicle pages when details are enabled.",
            "default": 4
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries with exponential backoff on errors and 429/5xx.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: Autosphere's API is public. Enable only if you get blocked."
          },
          "debug": {
            "title": "Debug logging",
            "type": "boolean",
            "description": "Verbose logs (retries, failed details).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}