{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX + Otomoto i Otodom: oferty, 392 filtry, miasto z promieniem",
    "description": "Pobiera oferty z OLX.pl: kategoria, podkategoria lub marka i model auta, miasto z promieniem w km i do 392 filtrów OLX (cena, rok, przebieg, metraż, typ umowy i inne). Opcjonalnie wzbogaca oferty danymi z Otomoto i Otodom. Do 1000 ofert na przebieg.",
    "version": "0.1",
    "x-build-id": "F65KDxOBbXTHA0vGU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/compelling_queue_klo~olx-poland-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-compelling_queue_klo-olx-poland-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/compelling_queue_klo~olx-poland-scraper/runs": {
      "post": {
        "operationId": "runs-sync-compelling_queue_klo-olx-poland-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/compelling_queue_klo~olx-poland-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-compelling_queue_klo-olx-poland-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": {
          "category": {
            "title": "Kategoria",
            "enum": [
              "praca",
              "motoryzacja",
              "nieruchomosci",
              "elektronika",
              "dom-ogrod",
              "moda",
              "zwierzeta",
              "sport-hobby"
            ],
            "type": "string",
            "description": "Kategoria główna OLX.pl. Zestaw dostępnych filtrów zależy od kategorii i podkategorii.",
            "default": "praca"
          },
          "subcategoryId": {
            "title": "Podkategoria lub marka auta (ID z OLX)",
            "minimum": 1,
            "type": "integer",
            "description": "Opcjonalnie. Numer podkategorii OLX z wybranej kategorii. Przykłady: 84 = Samochody osobowe, 206 = marka Toyota (wtedy model podajesz filtrem filter_enum_model=corolla), 15 = Mieszkania na wynajem, 14 = Mieszkania na sprzedaż, 1973 = Słuchawki bezprzewodowe. Podkategoria ma własne, dłuższe filtry niż kategoria główna. Zostaw puste, aby pobierać z całej kategorii."
          },
          "city": {
            "title": "Miasto",
            "type": "string",
            "description": "Opcjonalnie. Nazwa miejscowości, np. Wrocław. Gdy nazwa jest niejednoznaczna, dopisz powiat po przecinku (np. Bardo, ząbkowicki) albo podaj numer ID miejscowości OLX. Formularz w Console jest wstępnie wypełniony wartością Wrocław (próbny przebieg); wyczyść pole, aby szukać w całej Polsce."
          },
          "radiusKm": {
            "title": "Promień (km)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Opcjonalnie, wymaga podania miasta. Promień wokół miasta w km. Dozwolone wartości: 0, 2, 5, 10, 15, 20, 30, 50, 75, 100."
          },
          "maxItems": {
            "title": "Limit ofert na przebieg",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Ile ofert zapisać w jednym przebiegu. Domyślnie 100 (gdy pole pominięto w wywołaniu API), maksymalnie 1000 (tyle najwięcej oddaje OLX na jedno zapytanie). Formularz w Console jest wstępnie wypełniony wartością 20 (tani próbny przebieg).",
            "default": 100
          },
          "filters": {
            "title": "Filtry OLX (klucz=wartość)",
            "type": "array",
            "description": "Opcjonalnie, do 392 kluczy OLX; każdy wpis to osobny tekst klucz=wartość. Przykłady: filter_enum_petrol=diesel | filter_enum_model=corolla (tylko z podkategorią marki) | owner_type=private | sort_by=created_at:desc | filter_bool_remote_recruitment=1. Zakres to dwa wpisy: filter_float_price:from=1000 i filter_float_price:to=5000. Kilka wartości: powtórz klucz (LUB). Bez [0]. Zły klucz kończy przebieg bez kosztów. Lista kluczy i wartości: mode=listFilters albo README.",
            "items": {
              "type": "string"
            }
          },
          "proxyType": {
            "title": "Proxy",
            "enum": [
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "Domyślnie brak proxy. Datacenter i residential wymagają dostępu do tych grup proxy na koncie Apify (residential jest płatne za GB).",
            "default": "none"
          },
          "enrichDetails": {
            "title": "Wzbogać oferty z Otomoto / Otodom (płatne)",
            "type": "boolean",
            "description": "Domyślnie wyłączone. Dla ofert OLX, które przekierowują do Otomoto lub Otodom, dołącza wyposażenie, specyfikację i (Otodom, wynajem) koszt miesięczny z dodatkowymi opłatami. Każda faktycznie wzbogacona oferta jest rozliczana osobnym zdarzeniem „enriched-listing”. Ruch jest ograniczony: przerwa min. 2 s między zapytaniami, limit „maxEnrichments” na przebieg; po odpowiedzi 403/429 wzbogacanie kończy się, a zebrane dane zostają.",
            "default": false
          },
          "maxEnrichments": {
            "title": "Limit wzbogaceń na przebieg",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Działa tylko przy włączonym „Wzbogać oferty”. Ile ofert wzbogacić w jednym przebiegu (każda oferta przekierowana do Otomoto/Otodom zużywa jedno miejsce). Domyślnie 20, maksymalnie 100.",
            "default": 20
          },
          "mode": {
            "title": "Tryb pracy",
            "enum": [
              "scrape",
              "listFilters"
            ],
            "type": "string",
            "description": "scrape (domyślnie) = pobiera oferty z OLX. listFilters = zwraca katalog kategorii i filtrów OLX (ID, klucze do pola filters, dozwolone wartości, marki i modele) z lokalnych danych: bez zapytań do OLX i bez zdarzeń result, opłaty tylko za start przebiegu. Bez search i subcategoryId zwraca listę kategorii i zapisuje pełny katalog ID (rekord ID_CATALOG). Z subcategoryId zwraca filtry tej podkategorii lub marki. (EN: listFilters = filter catalog, no OLX requests.)",
            "default": "scrape"
          },
          "search": {
            "title": "Szukaj kategorii lub marki (tylko listFilters)",
            "type": "string",
            "description": "Tylko mode=listFilters. Nazwa kategorii, podkategorii lub marki do znalezienia, np. toyota, wynajem, laptopy (bez znaczenia wielkość liter i polskie znaki). Zwraca ID, ścieżkę i gotowy fragment wejścia (scrapeInput); dla marki auta także modele. Z subcategoryId szuka tylko w jego poddrzewie. Maksymalnie maxItems trafień."
          },
          "outputFormat": {
            "title": "Format wyniku",
            "enum": [
              "full",
              "compact",
              "markdown"
            ],
            "type": "string",
            "description": "full = wszystkie pola oferty (domyślnie, bez zmian). compact = krótki rekord o stałym kształcie dla agentów AI: id, url, tytuł, cena lub płaca jako zdanie, miasto, parametry, opis jako tekst. markdown = gotowy blok Markdown na ofertę (id, url, markdown). W compact i markdown cały wynik trafia też do rekordu OUTPUT (Key-Value) i działa budżet tokenów (domyślnie 8000, ok. 20 ofert).",
            "default": "full"
          },
          "llmFields": {
            "title": "Pola w trybach compact i markdown",
            "type": "array",
            "description": "Opcjonalnie. Lista pól dla compact i markdown, np. [\"title\",\"price\",\"city\"]. Puste = zestaw domyślny: title, price, city, seller, posted, params, description, schedule, details. Pola id i url są zawsze. Dozwolone: title, price, city, region, seller, posted, params, description, schedule, details, salary, photos, externalUrl.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxDescriptionChars": {
            "title": "Maks. długość opisu (znaki)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Tryby compact i markdown: opis oferty jako zwykły tekst (bez HTML), obcięty do tylu znaków na granicy słowa. Domyślnie 400, 0 = bez opisu. Gdy opis obcięto, rekord compact ma descriptionTruncated=true. Nie dotyczy trybu full.",
            "default": 400
          },
          "includeSummary": {
            "title": "Podsumowanie w OUTPUT",
            "type": "boolean",
            "description": "Tryby compact i markdown: dołącz do rekordu OUTPUT podsumowanie na początku (ile ofert, kategoria, miasto, czy wynik jest ucięty i dlaczego, jak go zawęzić). Domyślnie włączone. Dataset zawiera same oferty.",
            "default": true
          },
          "tokenBudget": {
            "title": "Budżet tokenów wyniku",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Tryby compact i markdown: przybliżony limit tokenów wyniku (szacunek: 1 token = 2,5 znaku). Zbieranie kończy się po wyczerpaniu budżetu (stopReason=token_budget), niezapisane oferty nie są rozliczane. 0 = automatycznie 8000. Zawsze wchodzi co najmniej jedna oferta. Nie dotyczy trybu full (bez limitu). Maks. 100000.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}