{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Portugal Scraper - Classifieds & Marketplace",
    "description": "Scrape OLX.pt classifieds and the full Imóveis real-estate section (sale and rent, all of Portugal): prices in EUR, typology, area, energy certificate, seller type, location, photos and the Imovirtual link. No login required.",
    "version": "0.1",
    "x-build-id": "0Sa2tlhMzXMwKrT7p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studio-amba~olx-pt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studio-amba-olx-pt-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/studio-amba~olx-pt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-studio-amba-olx-pt-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/studio-amba~olx-pt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-studio-amba-olx-pt-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": {
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Search for listings by keyword on OLX.pt (e.g. 'iphone', 'carro', 'bicicleta'). In the real-estate mode this is optional and narrows the read to listings matching the keyword. The value 'iphone' is ignored there."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Filter by OLX.pt category slug (e.g. 'telemoveis-e-tablets', 'carros-motos-e-barcos', 'moveis-casa-e-jardim'). Use 'imoveis' for the real-estate mode: it reads every Imóveis listing in Portugal (or in the chosen district), sale and rent, with property fields. Leave empty for all categories."
          },
          "propertyType": {
            "title": "Property type (real estate)",
            "enum": [
              "all",
              "apartamentos",
              "moradias",
              "terrenos",
              "lojas",
              "armazens",
              "escritorios",
              "garagens",
              "estabelecimentos-comerciais",
              "quartos",
              "casas-de-ferias",
              "permutas"
            ],
            "type": "string",
            "description": "Real-estate mode only. Limit the read to one Imóveis property type. Leave empty (or 'all') for every type. Setting this switches the actor to the real-estate mode even without category 'imoveis'."
          },
          "businessType": {
            "title": "Sale or rent (real estate)",
            "enum": [
              "all",
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Real-estate mode only. 'sale' reads 'Vende-se' listings, 'rent' reads 'Arrenda-se' listings (rooms and holiday homes count as rent). 'all' reads both, plus property swaps. Setting 'sale' or 'rent' switches the actor to the real-estate mode.",
            "default": "all"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Filter by Portuguese district or island name (e.g. 'Lisboa', 'Porto', 'Braga', 'Faro', 'Madeira', 'São Miguel', or 'Açores' for all Azores islands). Leave empty for all of Portugal."
          },
          "minPrice": {
            "title": "Minimum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter: minimum price in EUR."
          },
          "maxPrice": {
            "title": "Maximum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter: maximum price in EUR."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "newest",
              "cheapest",
              "most_expensive"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 250000,
            "type": "integer",
            "description": "Maximum number of listings to return. Hard cap 250,000. A whole-country Imóveis read is about 212,000 listings (November 2026); set this to 250000 to get all of them. Classifieds keyword searches stop at about 1,000 results per search (an OLX.pt limit); the real-estate mode splits the read automatically and is not bound by it.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel requests (real estate)",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Real-estate mode only. How many OLX.pt queries run at the same time (1-8). Requests are paced either way to stay under the OLX.pt rate limit.",
            "default": 4
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Real-estate mode only. Off by default. When on, the actor remembers every listing of this search and later runs save only what changed since the previous run: new listings, price changes, updated listings and removed listings. Each saved row gets a changeType field. The first run saves every listing as \"new\". Every run still reads the whole search, so set Max Results high enough to cover it (250000 for all of Portugal). Listings are marked removed only when the run read the whole search. For now change tracking works on searches of up to 20,000 listings; a larger search stops at the start without charging for listings.",
            "default": false
          },
          "trackingKey": {
            "title": "Tracking name",
            "type": "string",
            "description": "Optional name for the tracked search. Runs with the same name share one memory of listings. Leave empty to use a name made from the search filters (category, property type, sale or rent, location, price range, search query), so two different searches never mix. Use only letters, digits and - _ . ! ' ( )."
          },
          "includeUnchanged": {
            "title": "Also save unchanged listings",
            "type": "boolean",
            "description": "Change tracking only. Also save listings that did not change since the last run, with changeType \"unchanged\". Off by default, so a run saves only the changes.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Portuguese residential proxies recommended for reliable scraping.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "PT"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}