{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Scraper - Listings, Prices & Sellers in 8 Countries",
    "description": "Scrape OLX Poland, Portugal, Romania, Bulgaria, Ukraine, Kazakhstan, Uzbekistan and India: title, price, price drops, description, every attribute, photos, GPS, seller and dates. Search, links, sellers, past the 1,000 limit, monitor mode. $0.90 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "FJJz7xD85YMEWZzRn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~olx-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-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/topapi~olx-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-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/topapi~olx-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-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": {
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "What to search on OLX, one keyword per line (e.g. \"iphone 15\", \"bmw x5\", \"mieszkanie\"). Each keyword runs in every country chosen below. Leave empty to read a category or a location without a keyword.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "OLX sites to search with the keywords: pl = olx.pl, pt = olx.pt, ro = olx.ro, bg = olx.bg, ua = olx.ua, kz = olx.kz, uz = olx.uz, in = olx.in. Links below carry their own country.",
            "items": {
              "type": "string",
              "enum": [
                "pl",
                "pt",
                "ro",
                "bg",
                "ua",
                "kz",
                "uz",
                "in"
              ],
              "enumTitles": [
                "Poland (olx.pl)",
                "Portugal (olx.pt)",
                "Romania (olx.ro)",
                "Bulgaria (olx.bg)",
                "Ukraine (olx.ua)",
                "Kazakhstan (olx.kz)",
                "Uzbekistan (olx.uz)",
                "India (olx.in)"
              ]
            },
            "default": [
              "pl"
            ]
          },
          "startUrls": {
            "title": "OLX links (search pages or listings)",
            "type": "array",
            "description": "Paste OLX search pages with your filters set on the site (e.g. https://www.olx.pl/elektronika/telefony/warszawa/q-iphone/?search[order]=created_at:desc) or listing pages (https://www.olx.pt/d/anuncio/...-IDJI0bP.html, https://www.olx.in/item/...-iid-1861582746). Category, location, keyword, price and every search[filter_...] in the link are applied.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingIds": {
            "title": "Listing ids",
            "type": "array",
            "description": "Numeric OLX listing ids (read on the first country chosen above).",
            "items": {
              "type": "string"
            }
          },
          "sellerIds": {
            "title": "Seller ids (all listings of a seller)",
            "type": "array",
            "description": "Numeric OLX user ids (the sellerId field of a row) - every active listing of that seller on the first country chosen above. OLX Poland, Portugal, Romania, Bulgaria, Ukraine, Kazakhstan and Uzbekistan.",
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category",
            "type": "string",
            "description": "OLX category id (e.g. 1838 = Telefony on olx.pl, 1453 = Mobile Phones on olx.in), its path as in the site's links (elektronika/telefony) or its name. Applied by OLX."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or region name (e.g. \"Warszawa\", \"Lisboa\", \"Mumbai\"). Resolved with OLX's own location search and applied by OLX."
          },
          "radiusKm": {
            "title": "Radius around the city (km)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Also listings up to this many km from the city (OLX Europe sites; OLX offers 2, 5, 10, 15, 30, 50, 75, 100)."
          },
          "priceMin": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the site's currency. Applied by OLX."
          },
          "priceMax": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "In the site's currency. Applied by OLX."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used items (OLX Europe sites, categories that have a condition). Applied by OLX.",
            "default": "any"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Private sellers or businesses only (OLX Europe sites). Applied by OLX.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order OLX returns the listings in.",
            "default": "relevance"
          },
          "extraFilters": {
            "title": "Category filters (OLX filter parameters)",
            "type": "object",
            "description": "Any filter the OLX site offers in a category, by its OLX parameter name, e.g. {\"filter_float_year:from\": \"2015\", \"filter_enum_fuel_type\": [\"diesel\"], \"filter_float_m:from\": \"40\"} (cars, real estate, jobs...). The easiest way is to set the filters on olx and paste the link above."
          },
          "maxItems": {
            "title": "Max listings (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stops after this many listings in total. 0 = no limit.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each keyword x country / link. Empty = only the total cap."
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 1,
            "type": "integer",
            "description": "Pages of 50 listings (OLX Europe) or 40 (OLX India) per search. Empty = as many as the caps want."
          },
          "splitLargeSearches": {
            "title": "Read past OLX's 1,000-listing limit",
            "type": "boolean",
            "description": "OLX Europe shows at most 1,000 listings per search. On: a larger search is split into price slices, each read to its end, so a 15,000-listing search can be read whole (listings without a number price are only in the first 1,000).",
            "default": true
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only listings created in the last N days (combine with Sort = Newest first to stop reading at the first older one)."
          },
          "postedAfter": {
            "title": "Posted after (date)",
            "type": "string",
            "description": "Only listings created on or after this date (YYYY-MM-DD)."
          },
          "includeKeywords": {
            "title": "Title / description must contain one of",
            "type": "array",
            "description": "Keep a listing only if its title or description contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude listings containing",
            "type": "array",
            "description": "Drop a listing whose title or description contains one of these words (e.g. \"etui\", \"case\", \"uszkodzony\").",
            "items": {
              "type": "string"
            }
          },
          "strictMatch": {
            "title": "Every keyword word must appear",
            "type": "boolean",
            "description": "Keep only listings whose title or description contains every word of the search keyword (OLX also returns looser matches).",
            "default": false
          },
          "withPhotosOnly": {
            "title": "Only listings with photos",
            "type": "boolean",
            "description": "Drop listings without photos.",
            "default": false
          },
          "withPriceOnly": {
            "title": "Only listings with a price",
            "type": "boolean",
            "description": "Drop listings priced \"to agree\", free or for exchange.",
            "default": false
          },
          "priceDropOnly": {
            "title": "Only listings with a price drop",
            "type": "boolean",
            "description": "Only listings OLX shows with a lowered price (previousPrice above price).",
            "default": false
          },
          "deliveryOnly": {
            "title": "Only listings with OLX delivery / courier",
            "type": "boolean",
            "description": "Only listings with OLX delivery or courier shipping (OLX Europe).",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new listings)",
            "type": "boolean",
            "description": "Remember what earlier runs delivered for the same input and deliver only new listings (and listings whose price changed, see below). Schedule the run to get new OLX listings as they appear. An empty poll costs almost nothing and is not charged.",
            "default": false
          },
          "emitPriceChanges": {
            "title": "Monitor: deliver price changes",
            "type": "boolean",
            "description": "Deliver a listing again (changeType price-changed, with previousSeenPrice) when its price differs from the price an earlier run delivered.",
            "default": true
          },
          "emitUnchanged": {
            "title": "Monitor: deliver unchanged listings too",
            "type": "boolean",
            "description": "Deliver every listing found again, marked changeType unchanged (charged).",
            "default": false
          },
          "emitExpired": {
            "title": "Monitor: report listings that disappeared",
            "type": "boolean",
            "description": "After a search read to its end, add one free row (changeType expired) for each listing an earlier run delivered that OLX no longer shows.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate memories for monitors with the same input. Letters, numbers and dashes."
          },
          "resetMonitor": {
            "title": "Reset the monitor memory",
            "type": "boolean",
            "description": "Forget what earlier runs delivered: this run delivers everything it finds and starts a new memory.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (notification)",
            "type": "string",
            "description": "POSTs a summary with the first listings when a run delivers rows. Slack and Discord webhook links get a message in their format; any other URL gets JSON."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "With a chat id: a Telegram message when a run delivers rows."
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "The chat (or channel) id the bot sends to."
          },
          "includeDescription": {
            "title": "Include the description",
            "type": "boolean",
            "description": "Off: rows carry no description (smaller rows).",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "Cut descriptions to N characters",
            "minimum": 0,
            "type": "integer",
            "description": "0 = full text.",
            "default": 0
          },
          "descriptionFormat": {
            "title": "Description format",
            "enum": [
              "text",
              "html"
            ],
            "type": "string",
            "description": "Plain text (default) or the HTML OLX stores.",
            "default": "text"
          },
          "photoSize": {
            "title": "Photo size",
            "type": "string",
            "description": "Width x height of the photo links (OLX Europe), e.g. 1000x1000 or 400x300.",
            "default": "1000x1000"
          },
          "compact": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Only the main fields (id, url, title, price, condition, category, city, date, seller, photo, attributes), empty fields dropped.",
            "default": false
          },
          "deduplicate": {
            "title": "Deduplicate across searches",
            "type": "boolean",
            "description": "A listing found by several keywords or links is delivered once.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "OLX requests in flight at once.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: the run starts on its own connection and moves to Apify datacenter, then Apify residential in the site's country, only when OLX refuses it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}