{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX.pl Scraper - Polish Classified Listings",
    "description": "Collect verified OLX.pl listings from every category with search, price, location and category filters.",
    "version": "0.1",
    "x-build-id": "HANBdt8AnYQo3TNmb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ziomixshot~olx-pl-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ziomixshot-olx-pl-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/ziomixshot~olx-pl-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ziomixshot-olx-pl-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/ziomixshot~olx-pl-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ziomixshot-olx-pl-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": {
          "query": {
            "title": "Search phrase",
            "maxLength": 150,
            "type": "string",
            "description": "For example iphone 13. Leave empty to browse a whole category or place."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Category name or URL path, for example Elektronika, elektronika/telefony or motoryzacja/samochody. A name used by several categories (for example Telefony) is refused with the list of paths to choose from. Run with Show category filters to list the filters of a category."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or voivodeship, for example Kraków, Warszawa or Mazowieckie. Districts are not recognised by name: use District ID (Advanced) together with a city."
          },
          "distance": {
            "title": "Distance from the city (km)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Radius around the city in km: 0, 2, 5, 10, 15, 30, 50, 75 or 100 (0 means the city only). Needs Location (a city) or City ID.",
            "default": 0
          },
          "categoryFilters": {
            "title": "Category filters (JSON)",
            "type": "object",
            "description": "OLX filters of the chosen category, for example {\"filter_enum_petrol\":[\"diesel\"],\"filter_float_year\":{\"from\":2015}}. A name or value the category does not have fails the run before any listing is charged."
          },
          "priceFrom": {
            "title": "Price from (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in PLN, inclusive. Listings without a price are excluded when a price limit is set."
          },
          "priceTo": {
            "title": "Price to (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in PLN, inclusive."
          },
          "ownerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Show only private sellers or only businesses.",
            "default": "any"
          },
          "onlyWithPhotos": {
            "title": "Only listings with photos",
            "type": "boolean",
            "description": "Return only listings that have at least one photo.",
            "default": false
          },
          "onlyWithDelivery": {
            "title": "Only with OLX delivery",
            "type": "boolean",
            "description": "Return only listings with OLX delivery (the 'Tylko z przesyłką' checkbox on olx.pl). Cannot be combined with a location: OLX then searches all of Poland.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Newest uses the refresh time, as on OLX.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard limit of unique listings returned and charged.",
            "default": 100
          },
          "includePromoted": {
            "title": "Include promoted listings",
            "type": "boolean",
            "description": "Promoted listings match your filters too. Turn off to return organic results only.",
            "default": true
          },
          "enrichDetails": {
            "title": "Fetch offer details",
            "type": "boolean",
            "description": "Fetch every offer page and add push-up time, price flags, seller company data, key parameters and external link. Each enriched record is also charged the listing-details event; offers OLX no longer serves are skipped and not charged. Phone numbers are never returned.",
            "default": false
          },
          "includeViews": {
            "title": "Include page views",
            "type": "boolean",
            "description": "Add the number of page views to each enriched record. Requires Fetch offer details. When OLX returns no count the field is null.",
            "default": false
          },
          "includeRawData": {
            "title": "Include raw OLX data",
            "type": "boolean",
            "description": "Add the unmodified OLX offer as raw (the detail when enriched, otherwise the list card).",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "Scrape returns every matching listing. Monitor returns only listing IDs not reported by earlier runs that use the same store and key; it reads the newest first, skips promoted cards and ignores the sort option.",
            "default": "scrape"
          },
          "seenStoreName": {
            "title": "Seen-IDs store name",
            "type": "string",
            "description": "Named key-value store shared by monitor runs. Use one name per monitored search. Empty uses the run's default store, which does not keep history across independent runs."
          },
          "seenIdsKey": {
            "title": "Seen-IDs key",
            "type": "string",
            "description": "Record in the store that holds the reported IDs (up to 500000 newest IDs are kept).",
            "default": "OLX_SEEN_IDS"
          },
          "stopMonitorOnAllSeenPages": {
            "title": "Stop after N pages without new listings",
            "minimum": 1,
            "type": "integer",
            "description": "Monitor stops when this many consecutive pages contain no new organic listing. Raise it when new listings may appear further down the list.",
            "default": 1
          },
          "trackViews": {
            "title": "Track page views",
            "type": "boolean",
            "description": "Monitor only. Also returns a change record for every offer whose page views changed since the previous run. It checks the offers on the pages the monitor reads; the first run only stores the counters. Counters are kept next to the seen IDs, in the record named like the seen-IDs key plus _VIEWS (up to 200000 newest offers). Charged as the listing-change event.",
            "default": false
          },
          "countOnly": {
            "title": "Count only",
            "type": "boolean",
            "description": "Return only the number of listings OLX reports for the search, without collecting or charging for listings. Use it to estimate the cost of a run before you start it. Filters are still verified.",
            "default": false
          },
          "listFilters": {
            "title": "Show category filters",
            "type": "boolean",
            "description": "List the filters of the chosen category (names, labels, allowed values, ready-to-paste examples for Category filters) instead of collecting listings. Needs Category or Category ID. Free.",
            "default": false
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Copied OLX.pl search or category URLs, one per line. When set, they replace Query, Category, Location and the other search fields, so fill either the URLs or the fields. A URL with a part OLX cannot resolve (for example an unknown district) is rejected.",
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category ID",
            "minimum": 1,
            "type": "integer",
            "description": "OLX category ID, for example 99 for Elektronika or 84 for Samochody osobowe. Use it instead of Category when you already know the ID."
          },
          "regionId": {
            "title": "Region ID",
            "minimum": 1,
            "type": "integer",
            "description": "OLX region (voivodeship) ID, for example 2 for Mazowieckie. Use Location to give a place by name."
          },
          "cityId": {
            "title": "City ID",
            "minimum": 1,
            "type": "integer",
            "description": "OLX city ID, for example 17871 for Warszawa. Use Location to give a place by name."
          },
          "districtId": {
            "title": "District ID",
            "minimum": 1,
            "type": "integer",
            "description": "OLX district ID. Needs Location or City ID. The IDs are in the districtId field of the results."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}