{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Deal Monitor — New Listings & Below-Market Price Alerts",
    "description": "Monitor OLX searches in 7 countries. Get only new listings each run, see which ones are priced below market (median), and receive deal alerts in Telegram or via webhook. Fast, no login, no browser.",
    "version": "0.1",
    "x-build-id": "WuICM0YLvNRTexWoc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kala4~olx-deal-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kala4-olx-deal-monitor",
        "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/kala4~olx-deal-monitor/runs": {
      "post": {
        "operationId": "runs-sync-kala4-olx-deal-monitor",
        "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/kala4~olx-deal-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-kala4-olx-deal-monitor",
        "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": {
          "searchUrls": {
            "title": "OLX search URLs",
            "type": "array",
            "description": "Paste OLX search URLs that contain a keyword (…/q-your-keyword/). Supported: olx.pl, olx.ua, olx.ro, olx.pt, olx.bg, olx.kz, olx.uz. The keyword and price range from the URL are used; category filters are not.",
            "items": {
              "type": "string"
            }
          },
          "searches": {
            "title": "Searches (advanced)",
            "type": "array",
            "description": "Optional, instead of or in addition to URLs. Each search: {\"country\": \"pl|ua|ro|pt|bg|kz|uz\", \"query\": \"...\", \"minPrice\": 0, \"maxPrice\": 0, \"condition\": \"any|new|used\", \"sellerType\": \"any|private|business\", \"locationContains\": \"city or region\", \"excludeKeywords\": [\"…\"], \"label\": \"name in alerts\"}."
          },
          "maxListingsPerSearch": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of listings returned per search per run (newest first). You pay per listing returned.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only new listings since the last run",
            "type": "boolean",
            "description": "Return only listings that weren't returned before for this monitor. Turn on and schedule the Actor (e.g. every hour) to get a stream of new listings without duplicates.",
            "default": true
          },
          "excludeAccessories": {
            "title": "Exclude accessories",
            "type": "boolean",
            "description": "Skip cases, screen protectors, chargers, cables, holders etc. (e.g. \"Чохол для iPhone\", \"Etui do iPhone\"). Bundles like \"iPhone + case\" are kept.",
            "default": true
          },
          "excludeBrokenOrParts": {
            "title": "Exclude broken / for-parts items",
            "type": "boolean",
            "description": "Skip listings like \"на запчастини\", \"uszkodzony\", \"pentru piese\", \"for parts\", \"icloud locked\".",
            "default": true
          },
          "strictModelMatch": {
            "title": "Exact model only",
            "type": "boolean",
            "description": "Keep only listings whose title contains every keyword and no other model variant. Searching \"iphone 13 pro\" skips \"13 Pro Max\", \"iPhone 14 Pro\" and unrelated items. Local spellings like \"айфон 13 про\" are understood. Turn off for broad searches (e.g. \"bike\").",
            "default": true
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate name for remembering seen listings. Use different names for independent monitors with the same searches.",
            "default": "default"
          },
          "dealThresholdPercent": {
            "title": "Deal threshold (% below median)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "A listing is a deal when its price is at least this many percent below the median price of comparable listings for the same search.",
            "default": 30
          },
          "maxDealDiscountPercent": {
            "title": "Suspicious discount (% below median)",
            "minimum": 2,
            "maximum": 99,
            "type": "integer",
            "description": "Listings cheaper than this are flagged as suspicious (accessories, placeholder prices, scams) instead of deals.",
            "default": 70
          },
          "alertOn": {
            "title": "Send alerts for",
            "enum": [
              "deals",
              "new",
              "none"
            ],
            "type": "string",
            "description": "Which listings to send to Telegram / webhook.",
            "default": "deals"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional. Create a bot with @BotFather and paste its token. Stored encrypted."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional. Your chat ID (send a message to your bot, then open https://api.telegram.org/bot<token>/getUpdates to see it) or a channel like @mychannel."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. We POST a JSON payload with the alert listings (works with Make, Zapier, n8n, Slack workflows, Discord bridges)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed. Enable Apify Proxy only if OLX starts blocking requests."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}