{
  "openapi": "3.0.1",
  "info": {
    "title": "GoCar.be Car Scraper",
    "description": "Actor that scrapes gocar.be car listings from a search URL and returns normalized JSON records.",
    "version": "0.1",
    "x-build-id": "3PeCsZg89tNfYPCkJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/smtc~gocar-be-car-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-smtc-gocar-be-car-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/smtc~gocar-be-car-scraper/runs": {
      "post": {
        "operationId": "runs-sync-smtc-gocar-be-car-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/smtc~gocar-be-car-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-smtc-gocar-be-car-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": [
          "startUrl"
        ],
        "properties": {
          "startUrl": {
            "title": "Search URL",
            "type": "string",
            "description": "A GoCar search results URL."
          },
          "maxListings": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of listings to process.",
            "default": 300
          },
          "includeContactFields": {
            "title": "Include contact fields",
            "type": "boolean",
            "description": "Include seller contact fields when present and permitted.",
            "default": false
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Include listing image URLs in output.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw payloads",
            "type": "boolean",
            "description": "Include source payloads for debugging.",
            "default": false
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of search result pages to inspect.",
            "default": 100
          },
          "requestDelayMs": {
            "title": "Request delay ms",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Delay between listing requests.",
            "default": 500
          },
          "headless": {
            "title": "Headless browser",
            "type": "boolean",
            "description": "Run Chromium in headless mode.",
            "default": true
          },
          "scrollPasses": {
            "title": "Search scroll passes",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of scroll passes per search page to trigger lazy-loaded results.",
            "default": 5
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout seconds",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Timeout for page navigations.",
            "default": 45
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Use Apify Proxy when the actor runs on Apify and APIFY_PROXY_PASSWORD is available.",
            "default": true
          },
          "useInternalSearchApi": {
            "title": "Use internal search API",
            "type": "boolean",
            "description": "Reserved phase-2 mode. When implemented, call search.gocar.be/multi-search from the verified browser context.",
            "default": false
          },
          "searchResultMode": {
            "title": "Search result mode",
            "enum": [
              "detail-pages",
              "native-ui"
            ],
            "type": "string",
            "description": "Choose whether to scrape detail pages or capture GoCar's native rendered search responses.",
            "default": "native-ui"
          },
          "nativeSearchEntryUrl": {
            "title": "Native search entry URL",
            "type": "string",
            "description": "Entry page used for native UI response capture. Defaults to the language home page derived from startUrl, for example https://gocar.be/en."
          },
          "nativeSearchSourceUrl": {
            "title": "Native search source URL",
            "type": "string",
            "description": "Optional URL whose query parameters are converted to UI filter clicks while nativeSearchEntryUrl is used for the initial page load."
          },
          "nativeSearchPaginationPages": {
            "title": "Native search pagination pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum native search pages to collect in native-ui mode, including the first filtered response. Native mode may raise the effective page count up to the estimated total when maxListings is higher.",
            "default": 100
          },
          "nativeSearchPartitioning": {
            "title": "Native search partitioning",
            "type": "boolean",
            "description": "Automatically split large native search result sets into smaller range partitions when the GoCar search backend result window is likely to cap pagination.",
            "default": true
          },
          "nativeSearchPartitionThreshold": {
            "title": "Native search partition threshold",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Estimated result count at which native-ui mode enables partitioning. GoCar's observed search window is about 1000 hits, so the default leaves margin.",
            "default": 950
          },
          "nativeSearchMaxPartitions": {
            "title": "Native search max partitions",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of range partitions to create for one run. Current automatic partitioning supports first_registration_year ranges.",
            "default": 25
          },
          "nativeSearchReadyTimeoutSecs": {
            "title": "Native search ready timeout seconds",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for targeted native search diagnostics to wait until widgets and native search responses are ready.",
            "default": 45
          },
          "nativeSearchEntryWaitUntil": {
            "title": "Native search entry wait until",
            "enum": [
              "domcontentloaded",
              "load",
              "commit"
            ],
            "type": "string",
            "description": "Playwright page.goto waitUntil setting used only for the neutral native-search entry page. The default returns as soon as the main document is committed.",
            "default": "commit"
          },
          "nativeSearchEntryTimeoutSecs": {
            "title": "Native search entry timeout seconds",
            "minimum": 10,
            "maximum": 180,
            "type": "integer",
            "description": "Navigation timeout used only for the neutral native-search entry page. Timeout on this entry page is tolerated in native-ui mode if the page is partially loaded.",
            "default": 45
          },
          "listingCardSelector": {
            "title": "Listing card selector",
            "type": "string",
            "description": "Rendered search-result card selector.",
            "default": ".vehicle-item"
          },
          "loadMoreSelector": {
            "title": "Load more selector",
            "type": "string",
            "description": "Rendered InstantSearch load-more button selector.",
            "default": "button.ais-InfiniteHits-loadMore"
          },
          "clickSpecTabs": {
            "title": "Click spec tabs",
            "type": "boolean",
            "description": "Click known detail-page specification tabs before parsing.",
            "default": true
          },
          "detailNavigationMode": {
            "title": "Detail navigation mode",
            "enum": [
              "direct",
              "click"
            ],
            "type": "string",
            "description": "Open detail pages directly by URL or by clicking links from the rendered search page.",
            "default": "direct"
          },
          "diagnosticOnly": {
            "title": "Diagnostic only",
            "type": "boolean",
            "description": "Open diagnostic URLs through the configured browser/proxy and exit without scraping listings.",
            "default": false
          },
          "skipAccessDiagnostics": {
            "title": "Skip access diagnostics",
            "type": "boolean",
            "description": "In diagnostic-only mode, skip generic access URLs and run only the selected targeted diagnostics.",
            "default": false
          },
          "internalSearchDiagnostic": {
            "title": "Internal search diagnostic",
            "type": "boolean",
            "description": "In diagnostic-only mode, open startUrl first and attempt search.gocar.be/multi-search from that verified browser context.",
            "default": false
          },
          "nativeSearchStateDiagnostic": {
            "title": "Native search state diagnostic",
            "type": "boolean",
            "description": "In diagnostic-only mode, open the native entry page, apply URL-derived filters, capture native search responses, and inspect in-page search state.",
            "default": false
          },
          "internalSearchLimit": {
            "title": "Internal search limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of hits to request in the browser-context internal search diagnostic.",
            "default": 51
          },
          "internalSearchSourceUrl": {
            "title": "Internal search source URL",
            "type": "string",
            "description": "Optional GoCar search URL whose filters are converted to the browser-context internal search payload while startUrl is used as the page entry point."
          },
          "internalSearchDisableDefaultFilter": {
            "title": "Disable default internal search filter",
            "type": "boolean",
            "description": "Diagnostic switch: omit the default point_of_sale_master filter from the browser-context internal search payload.",
            "default": false
          },
          "internalSearchMinimalPayload": {
            "title": "Minimal internal search payload",
            "type": "boolean",
            "description": "Diagnostic switch: send only index, facets, limit, and offset to mimic the first native GoCar InstantSearch request.",
            "default": false
          },
          "internalSearchOffset": {
            "title": "Internal search offset",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Offset to request in the browser-context internal search diagnostic.",
            "default": 0
          },
          "diagnosticUrls": {
            "title": "Diagnostic URLs",
            "type": "array",
            "description": "URLs to open in diagnostic-only mode.",
            "items": {
              "type": "string"
            },
            "default": [
              "http://proxy.apify.com",
              "https://api.apify.com/v2/browser-info",
              "https://www.gocar.be/robots.txt",
              "https://search.gocar.be/multi-search"
            ]
          },
          "apifyProxyGroups": {
            "title": "Apify Proxy groups",
            "type": "array",
            "description": "Optional Apify Proxy groups, for example RESIDENTIAL if enabled on the account.",
            "items": {
              "type": "string"
            },
            "default": [
              "RESIDENTIAL"
            ]
          },
          "apifyProxySession": {
            "title": "Apify Proxy session",
            "type": "string",
            "description": "Optional sticky Apify Proxy session identifier. Applied only when a proxy group is selected.",
            "default": "BE"
          },
          "apifyProxyCountryCode": {
            "title": "Apify Proxy country code",
            "type": "string",
            "description": "Optional proxy country code, for example BE, NL, FR, DE, or US."
          },
          "proxyUrl": {
            "title": "Proxy URL",
            "type": "string",
            "description": "Optional explicit proxy URL for Chromium. Overrides Apify Proxy settings."
          },
          "logDiagnostics": {
            "title": "Log diagnostics",
            "type": "boolean",
            "description": "Log rendered page title, URL, link count, and text preview for troubleshooting Cloudflare or selector issues.",
            "default": false
          },
          "saveDiagnostics": {
            "title": "Save diagnostics",
            "type": "boolean",
            "description": "Save HTML and screenshot snapshots to the default key-value store after navigation or failure.",
            "default": false
          },
          "waitUntil": {
            "title": "Navigation wait until",
            "enum": [
              "domcontentloaded",
              "load",
              "commit"
            ],
            "type": "string",
            "description": "Playwright page.goto waitUntil setting.",
            "default": "domcontentloaded"
          },
          "challengeWaitSecs": {
            "title": "Challenge wait seconds",
            "minimum": 0,
            "maximum": 180,
            "type": "integer",
            "description": "Extra time to wait for browser security verification pages to complete before failing.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}