{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Scraper & API: Poland, Ukraine, Romania + 4 More",
    "description": "OLX scraper and API for olx.pl, olx.ua, olx.ro, olx.pt, olx.bg, olx.kz and olx.uz (парсер OLX). Search by keyword, city, price and condition, or paste a search URL. Prices, location, seller type, photos as JSON/CSV. Empty runs, junk suggestions and out-of-range promoted ads are never charged.",
    "version": "0.1",
    "x-build-id": "n7rFy6IBfdp9rAwdy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clover_engineer~olx-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clover_engineer-olx-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/clover_engineer~olx-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clover_engineer-olx-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/clover_engineer~olx-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clover_engineer-olx-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": {
          "country": {
            "title": "Country",
            "enum": [
              "RO",
              "PL",
              "PT",
              "BG",
              "UA",
              "KZ",
              "UZ"
            ],
            "type": "string",
            "description": "Which OLX site to search. One country per run (search URLs must be on this country's site). OLX Brazil and India are different platforms and aren't supported.",
            "default": "RO"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search, one search per line, e.g. \"iphone 13\". Use the local language for best results (e.g. \"rower\" in Poland, \"велосипед\" in Ukraine). Uses the location and filters below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "OLX search URLs",
            "type": "array",
            "description": "Alternatively, paste search URLs copied from your browser on the selected country's OLX site, e.g. https://www.olx.pl/elektronika/telefony/q-iphone/. Their category, location and filters are kept; the price, condition and sort filters below are added on top.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or region for keyword searches, in the local spelling: \"Cluj-Napoca\" (RO), \"Warszawa\" (PL), \"Lisboa\" (PT), \"София\" (BG), \"Київ\" (UA), \"Алматы\" (KZ), \"Ташкент\" (UZ). Empty = whole country."
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Optional OLX category ID for keyword searches. Easiest: open the category on OLX.ro, run the search, and paste the URL in \"OLX.ro search URLs\" instead."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or above this, in the site's main currency (RON, PLN, EUR, UAH, KZT, UZS)."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at or below this."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used items only.",
            "default": "all"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of results.",
            "default": "relevance"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Keep only private sellers or only businesses. Filtering happens after download, so you pay only for listings kept.",
            "default": "all"
          },
          "includePromoted": {
            "title": "Include promoted listings",
            "type": "boolean",
            "description": "OLX mixes paid \"top\" ads into results, often off-topic. Turn off to skip them.",
            "default": true
          },
          "maxItems": {
            "title": "Max listings (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many listings in total. 0 = no limit (OLX serves at most 1,000 listings per search).",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each search after this many listings. 0 = no per-search limit.",
            "default": 0
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "basic",
              "enhanced"
            ],
            "type": "string",
            "description": "Basic ($0.99 per 1,000 listings): direct requests, works for most runs. Enhanced ($3 per 1,000): every request goes through Apify residential proxy in the selected country, for when OLX blocks basic mode.",
            "default": "basic"
          },
          "autoUpgradeOnBlock": {
            "title": "Auto-upgrade when blocked",
            "type": "boolean",
            "description": "If OLX blocks basic mode, continue the run through residential proxy and charge the listings fetched after the switch at the enhanced price ($3 instead of $0.99 per 1,000). Listings already fetched stay at the basic price. Turn off to never pay the enhanced price; a blocked run then stops early and you pay only for listings delivered.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Your own proxy (advanced)",
            "type": "object",
            "description": "Optional. Your own proxy URLs are used in basic mode and billed at the basic price. Choosing Apify Proxy here is the same as enhanced mode."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}