{
  "openapi": "3.0.1",
  "info": {
    "title": "Sahibinden.com Car Scraper",
    "description": "Extract car listings from sahibinden.com — Turkey's #1 classifieds platform. Get make, model, year, mileage, price, location, and more. Requires Turkish residential proxies.",
    "version": "0.1",
    "x-build-id": "TW9lWSi4qUcXe79ND"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~sahibinden-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-sahibinden-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~sahibinden-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-sahibinden-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~sahibinden-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-sahibinden-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": {
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Add one or more Sahibinden car category or search URLs with your desired filters applied.<br><br>Accepted formats:<br>• <code>https://www.sahibinden.com/en/cars</code> — all cars<br>• <code>https://www.sahibinden.com/en/cars/bmw</code> — single brand<br>• <code>https://www.sahibinden.com/en/cars?sorting=date_desc</code> — with filters<br><br>💡 <b>Tip:</b> Apply filters directly on sahibinden.com and copy the URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "brand": {
            "title": "🚗 Brand",
            "type": "string",
            "description": "Filter by car manufacturer (e.g. BMW, Mercedes, Toyota). Leave empty to scrape all brands.<br><br>⚠️ Ignored when <b>Start URLs</b> are provided — the URL takes priority."
          },
          "maxPages": {
            "title": "💯 Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of listing pages to scrape. Each page has ~20 results.<br><br>Recommended values:<br>• <b>1–5 pages</b> — quick test (20–100 results)<br>• <b>10–50 pages</b> — market sample<br>• <b>100–500 pages</b> — full inventory scan<br><br>💡 <b>Tip:</b> Start with 3 pages to estimate costs before scaling.",
            "default": 3
          },
          "maxItems": {
            "title": "📊 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after collecting this many listings. Leave empty for no limit (controlled by Max pages instead).<br><br>💡 Use this for precise volume control."
          },
          "sessionCookies": {
            "title": "🍪 Session cookies",
            "type": "string",
            "description": "Paste your session cookies exported from a real browser logged into sahibinden.com.<br><br>Sahibinden frequently redirects new proxy IPs to a mandatory login page (<code>/giris</code>). Providing session cookies helps bypass this wall.<br><br>How to export:<br>1. Log into sahibinden.com in your browser<br>2. Use <b>EditThisCookie</b> or DevTools → Application → Cookies<br>3. Copy all cookies as JSON and paste here<br><br>⚠️ <b>Never save cookies in published tasks.</b> Only provide them when running your own tasks."
          },
          "requestDelay": {
            "title": "⏱️ Request delay (ms)",
            "minimum": 1000,
            "maximum": 30000,
            "type": "integer",
            "description": "Delay between page requests in milliseconds.<br><br>Recommended values:<br>• <b>3000 ms</b> — safe default<br>• <b>5000–10000 ms</b> — if getting rate-limited<br>• <b>1000 ms</b> — faster but riskier",
            "default": 3000
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy configuration",
            "type": "object",
            "description": "Proxy settings. <b>Turkish residential proxies are required</b> — Sahibinden blocks datacenter IPs.<br><br>Recommended setup:<br>• Proxy group: <b>RESIDENTIAL</b><br>• Country: <b>TR</b> (Turkey)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}