{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Scraper: Listings, Ad Details, Phone Numbers",
    "description": "Scrape OLX in Poland, Ukraine, Romania, Bulgaria, Portugal, Kazakhstan, Uzbekistan, and India. Search by keyword, category, location, and price, or paste an OLX search link. Get ad details with descriptions and photos, and seller phone numbers where OLX allows it. $2 per 1,000 results.",
    "version": "0.0",
    "x-build-id": "QbZp20XRVQHqixvcG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sourabhbgp~olx-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sourabhbgp-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/sourabhbgp~olx-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sourabhbgp-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/sourabhbgp~olx-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sourabhbgp-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",
        "required": [
          "mode",
          "market"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Search finds offers by keyword, filters or a pasted OLX search URL. Offer details fetches specific offers by URL or ID.",
            "default": "search"
          },
          "market": {
            "title": "Market (country)",
            "enum": [
              "pl",
              "ua",
              "ro",
              "bg",
              "pt",
              "kz",
              "uz",
              "in"
            ],
            "type": "string",
            "description": "OLX country site to use. Each country has its own offers, so an ID works only on its own market. A pasted URL always uses its own country, whatever this says.",
            "default": "pl"
          },
          "query": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text keyword. Leave it empty to browse a whole category or location."
          },
          "startUrls": {
            "title": "OLX search URLs",
            "type": "array",
            "description": "Search mode: paste OLX search or category page URLs with the filters already set on the website. Each URL's own market and filters are used, so the query, category, region, city, price, condition and sort fields below are ignored for them. Max results is the total across all URLs.",
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric OLX category ID. A result row shows its narrowest category as categoryId. The easy way to use a category is to paste its OLX page into OLX search URLs."
          },
          "regionId": {
            "title": "Region ID",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric region ID (for example a Polish voivodeship). It is shown as regionId on any result row."
          },
          "cityId": {
            "title": "City ID",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric city ID. It is shown as cityId on any result row. It works on its own. If you also set Region ID, the city must be in that region, or OLX returns nothing. On OLX India, the city is used and the region ignored."
          },
          "priceMin": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price, in the currency OLX uses for that category: usually the local one, but euros on OLX Romania property and cars, and always UZS on OLX Uzbekistan (optional)."
          },
          "priceMax": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price, in the currency OLX uses for that category: usually the local one, but euros on OLX Romania property and cars, and always UZS on OLX Uzbekistan (optional)."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "any",
              "new",
              "used"
            ],
            "type": "string",
            "description": "Item condition. Some categories, such as cars and real estate on some markets, do not have this filter: OLX then rejects the search and the run says so. OLX India has no new or used filter: leave it on Any there.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "created_desc",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Result order. Newest first goes by when an offer was last refreshed, not when it was created. Sponsored offers can appear out of order, as they do on the website.",
            "default": "relevance"
          },
          "postedAfter": {
            "title": "Posted after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\S+)?$",
            "type": "string",
            "description": "Search mode: only offers created on or after this date (for example 2026-11-01). Results are read newest first, whatever Sort by says. A date with no time means midnight UTC."
          },
          "offerUrls": {
            "title": "Offer URLs or IDs",
            "type": "array",
            "description": "OLX offer URLs (https://www.olx.pl/d/oferta/...) or bare numeric offer IDs. An ID uses the Market setting; a URL uses its own country.",
            "items": {
              "type": "string"
            }
          },
          "includePhone": {
            "title": "Reveal phone numbers",
            "type": "boolean",
            "description": "Look up the seller's phone number on offers that have one. It adds one request per offer, and OLX refuses the lookup on many offers: phoneStatus says what happened on each row. OLX India gives no numbers: phoneStatus is not_available there.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many offers. 0 means no limit: OLX serves about 1,300 offers per search, or 10,000 on OLX India. Sponsored offers count towards this number.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}