{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Listings Scraper",
    "description": "Search live OLX Group marketplace listings across 7 countries (Poland, Ukraine, Kazakhstan, Uzbekistan, Romania, Bulgaria, Portugal) — price, condition, seller, photos and location, routed to whichever surface each country's robots.txt actually allows.",
    "version": "0.1",
    "x-build-id": "FYIgaqEhhWCnwsWdG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~olx-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-olx-listings-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/scrapyx~olx-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-olx-listings-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/scrapyx~olx-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-olx-listings-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": [
              "pl",
              "ua",
              "kz",
              "uz"
            ],
            "type": "string",
            "description": "Which OLX site to read. Only these four are offered: their own robots.txt permits the offers endpoint. OLX Romania, Bulgaria and Portugal disallow /api/ with no exception, and OLX Brazil, Bosnia and India answer robots.txt with a challenge page, so none of those are available here.",
            "default": "pl"
          },
          "queries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords to search, one run each with its own summary row. Note that a keyword OLX does not recognise does NOT return zero: it falls back to fuzzy matches, so rows coming back is not proof the keyword was understood. When OLX substitutes something it is reported in the summary's searchSuggestion. Pass an empty string to list a whole category without a keyword.",
            "default": [
              "iphone"
            ],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (id or path)",
            "type": "string",
            "description": "Optional category, given either as a numeric id (for example 99) or as OLX's own path (for example 'nieruchomosci'). It is checked against the category tree OLX publishes on its own listing page before any request is spent, and an unknown value is refused with examples rather than guessed at."
          },
          "regionId": {
            "title": "Region id",
            "minimum": 1,
            "type": "integer",
            "description": "Optional numeric region id. Be careful with this one: OLX answers an unknown region id with HTTP 200 and zero rows, which is indistinguishable from a search that genuinely matched nothing. Read the regionId off a row from an unfiltered run rather than guessing."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Result ordering. Checked against this list before the request, because OLX refuses the plausible value 'relevance' with HTTP 400 while silently ignoring outright nonsense - so its own error is not a validity test.",
            "default": "relevance"
          },
          "priceFrom": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Lower price bound, in the country's own currency. Verified to genuinely move the match count."
          },
          "priceTo": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Upper price bound, in the country's own currency."
          },
          "includePromoted": {
            "title": "Include promoted (paid) listings",
            "type": "boolean",
            "description": "OLX injects paid placements on top of every page - about 12 extra rows per page of 40 - and publishes which positions they occupy. They are kept by default and flagged with isPromoted so you can tell them apart. Turn this off to keep organic results only; either way the summary reports how many there were.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 21,
            "type": "integer",
            "description": "Pages per keyword. OLX caps paging at offset 1040 whatever the reported match count, so about 1,000 organic listings is the hard ceiling per search even when it says 159,000 matched. To go deeper, narrow the search rather than raising this.",
            "default": 5
          },
          "pageSize": {
            "title": "Listings per page",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Organic listings requested per page. 50 is OLX's ceiling - 100 is refused. Promoted listings arrive on top of this number, so a page of 50 returns about 65 rows.",
            "default": 50
          },
          "maxItems": {
            "title": "Max listings (all searches)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional overall cap on listing rows across every search. Summary rows are always emitted and do not count against it."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Parallel requests across searches.",
            "default": 3
          },
          "minRequestInterval": {
            "title": "Min seconds between requests",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Politeness delay between request starts. It paces starts only and does not hold a concurrency slot, so raising it slows the run without idling the workers.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Not needed for OLX in testing; use it if you are running at volume or from a blocked network.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}