{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Scraper & API: Export Listings from PL, RO, PT, BG, UA",
    "description": "Scrape OLX (olx.pl, olx.ro, olx.pt, olx.bg, olx.ua, olx.kz) without login: search by keyword, category, place, radius, price, condition and seller, or paste search URLs. Full description, price, photos, seller, coordinates, delivery. Tens of thousands of ads per run. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "Lh1P7XDicakaBoIQ7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~olx-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~olx-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~olx-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": "OLX site",
            "enum": [
              "pl",
              "ro",
              "pt",
              "bg",
              "ua",
              "kz"
            ],
            "type": "string",
            "description": "Which OLX site to search with the keywords below. URLs you paste always use their own site.",
            "default": "pl"
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "What to search on OLX: any words you would type in the search box, in the language of the site. One search per keyword. Leave empty to take every ad of the category or place below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "OLX search URLs",
            "type": "array",
            "description": "Search or category pages copied from your browser with the filters already set (for example https://www.olx.pl/elektronika/telefony/q-iphone/?search[filter_float_price:from]=1000). All filters, the place, the category and the sort order of the page are kept.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Ads per search or URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum ads for each keyword and each URL. OLX shows at most 1 000 ads per search, so above 1 000 the Actor cuts the search into slices (region, price band, city, district) and joins them: ads come in slice order, not in one global order.",
            "default": 100
          },
          "location": {
            "title": "Region or city",
            "type": "string",
            "description": "Only ads from this region or city, as OLX writes it (Mazowieckie, Warszawa, București, Lisboa, Київ). Empty = the whole country."
          },
          "radiusKm": {
            "title": "Radius around the city (km)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Also include ads within this distance of the city (cities only, not regions). 0 = the city only.",
            "default": 0
          },
          "categoryId": {
            "title": "Category ID",
            "type": "string",
            "description": "Only this category (a number such as 99 = Elektronika on olx.pl). The easy way: open the category on OLX and paste its URL in \"OLX search URLs\"."
          },
          "priceFrom": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or above this amount (in the currency of the site)."
          },
          "priceTo": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or below this amount (in the currency of the site)."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used items only (categories that have a condition).",
            "default": "all"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Private sellers only, businesses only, or both.",
            "default": "all"
          },
          "photosOnly": {
            "title": "Only ads with photos",
            "type": "boolean",
            "description": "Skip ads without a photo.",
            "default": false
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "relevance",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Newest first, best match, or by price. Inside a cut search the order holds within each slice.",
            "default": "newest"
          },
          "onlyNew": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Output only ads that were not returned for the same search in the previous runs with the same monitor name (sorted by newest, up to 1 000 per search). Schedule the Actor to get new ads every hour.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps the memory of seen ads apart for different schedules."
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every request retry.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}