{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Brasil New Listings Monitor",
    "description": "Novos anúncios da OLX Brasil em minutos: carros, motos, imóveis ou qualquer busca. Agende a cada 10-60 min e receba só o que é novo desde a última execução, com alertas no Telegram, Slack, Discord ou webhook.",
    "version": "0.1",
    "x-build-id": "kkuCTiqzA3bllJvaU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/juanga~olx-br-new-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-juanga-olx-br-new-listings",
        "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/juanga~olx-br-new-listings/runs": {
      "post": {
        "operationId": "runs-sync-juanga-olx-br-new-listings",
        "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/juanga~olx-br-new-listings/run-sync": {
      "post": {
        "operationId": "run-sync-juanga-olx-br-new-listings",
        "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": [
          "searchUrls"
        ],
        "properties": {
          "searchUrls": {
            "title": "URLs de busca",
            "type": "array",
            "description": "URLs de busca da OLX Brasil, com os filtros que quiser (marca, modelo, ano, preço, região, tipo de imóvel...). Faça a busca na OLX, aplique os filtros e copie a URL. Funciona com qualquer categoria: carros, motos, imóveis, eletrônicos...",
            "items": {
              "type": "string"
            }
          },
          "sellerType": {
            "title": "Tipo de anunciante",
            "enum": [
              "all",
              "private",
              "professional"
            ],
            "type": "string",
            "description": "Filtra por quem publica. \"Só particulares\" é o mais útil para revendedores e imobiliárias que querem captar.",
            "default": "all"
          },
          "firstRun": {
            "title": "Primeira execução",
            "enum": [
              "emit",
              "baseline"
            ],
            "type": "string",
            "description": "O que a primeira execução de uma busca retorna. \"Retornar anúncios atuais\" mostra a primeira página de resultados. \"Baseline\" só registra o que existe agora, e as próximas execuções retornam apenas anúncios novos.",
            "default": "emit"
          },
          "maxPagesPerSearch": {
            "title": "Máximo de páginas por busca",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Os resultados vêm do mais novo ao mais antigo, então normalmente basta 1 página por execução. Aumente se a busca recebe mais de ~50 anúncios entre execuções.",
            "default": 3
          },
          "stateStoreName": {
            "title": "Nome do armazenamento de estado",
            "type": "string",
            "description": "Key-value store nomeado que guarda quais anúncios já foram retornados. Use outro nome para começar um histórico separado.",
            "default": "olx-br-new-listings-state"
          },
          "seenRetentionDays": {
            "title": "Lembrar anúncios por (dias)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Por quanto tempo um anúncio retornado é lembrado, para não ser retornado de novo.",
            "default": 30
          },
          "failOnAnyError": {
            "title": "Falhar a execução se alguma busca falhar",
            "type": "boolean",
            "description": "Marca a execução como falha quando qualquer busca é bloqueada, inválida ou não carrega, para que o monitoramento da Apify te avise.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Conexão tentada primeiro. Sem proxy é o mais barato.",
            "default": {
              "useApifyProxy": false
            }
          },
          "fallbackProxyConfiguration": {
            "title": "Proxy alternativo (se bloqueado)",
            "type": "object",
            "description": "Usado só quando a OLX bloqueia a primeira conexão. IPs residenciais do Brasil. Cada página carregada por ele é cobrada como evento \"proxy page\". Defina \"No proxy\" para desativar.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "BR"
            }
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Opcional. Envia os anúncios novos para o Telegram. Crie um bot com o @BotFather."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "ID do chat, grupo ou canal onde o bot publica."
          },
          "whatsappPhone": {
            "title": "WhatsApp: seu número",
            "type": "string",
            "description": "Opcional. Recebe os alertas no WhatsApp via CallMeBot (grátis). Número com código do país, ex.: +5511999998888. Ative uma vez enviando \"I allow callmebot to send me messages\" para +34 644 51 95 23 pelo WhatsApp e cole a API key abaixo."
          },
          "whatsappApiKey": {
            "title": "WhatsApp: API key do CallMeBot",
            "type": "string",
            "description": "A chave que o CallMeBot responde no WhatsApp."
          },
          "emailTo": {
            "title": "E-mail para alertas (o da sua conta Apify)",
            "type": "string",
            "description": "Opcional. Use o e-mail da sua conta Apify: o serviço de e-mail da Apify só envia para o dono da conta. Custo de frações de centavo por envio."
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL",
            "type": "string",
            "description": "Optional."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Optional."
          },
          "webhookUrl": {
            "title": "Custom webhook URL",
            "type": "string",
            "description": "Opcional. Recebe um POST JSON { search, count, listings } por busca com anúncios novos."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}