{
  "openapi": "3.0.1",
  "info": {
    "title": "OLX Portugal Scraper & API: Export Listings, Prices, Sellers",
    "description": "Scrape OLX Portugal (olx.pt) without login: search by keyword, category, district or city, radius, price in EUR, condition and seller, or paste search URLs. Full description, price, photos, seller, coordinates, delivery. Tens of thousands of ads per run. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "TPJzzcR12vJUXAuve"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~olx-portugal-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-olx-portugal-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/s_actors~olx-portugal-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-olx-portugal-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/s_actors~olx-portugal-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-olx-portugal-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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "What to search on olx.pt: any words you would type in the search box, in Portuguese or English (iphone, bicicleta). One search per keyword. Leave empty to take every ad of the category or region below.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "OLX.pt search URLs",
            "type": "array",
            "description": "Search or category pages copied from your browser with the filters already set (for example https://www.olx.pt/ads/q-iphone/?search[filter_float_price:from]=2000). All filters, the place, the category and the sort order of the page are kept.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Ads per search or URL",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum ads for each keyword and each URL. OLX shows at most 1 000 ads per search, so above 1 000 the Actor cuts the search into slices (region, price band, city, district) and joins them: ads come in slice order, not in one global order.",
            "default": 100
          },
          "location": {
            "title": "District or city",
            "type": "string",
            "description": "Only ads from this region or city, as OLX writes it, in Portuguese: Lisboa, Porto, Braga, Coimbra, Faro, Setúbal, Madeira. Empty = the whole of Portugal."
          },
          "radiusKm": {
            "title": "Radius around the city (km)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Also include ads within this distance of the city (cities only, not regions). 0 = the city only.",
            "default": 0
          },
          "categoryId": {
            "title": "Category ID",
            "type": "string",
            "description": "Only this category: 11 Tecnologia, 25 Telemóveis e Tablets, 16 Imóveis, 362 Carros, motos e barcos, 5478 Peças e acessórios, 13 Móveis, Casa e Jardim, 14 Moda, 99 Bebé e Criança, 12 Desporto, 26 Lazer, 10 Animais, 190 Emprego, 191 Serviços, 4918 Equipamentos e Ferramentas, 4800 Agricultura, 185 Outras Vendas. For a subcategory open it on OLX and paste its URL in \"OLX.pt search URLs\"."
          },
          "priceFrom": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or above this amount (in EUR)."
          },
          "priceTo": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Only ads priced at or below this amount (in EUR)."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "used"
            ],
            "type": "string",
            "description": "New or used items only (categories that have a condition).",
            "default": "all"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "business"
            ],
            "type": "string",
            "description": "Private sellers only, businesses only, or both.",
            "default": "all"
          },
          "photosOnly": {
            "title": "Only ads with photos",
            "type": "boolean",
            "description": "Skip ads without a photo.",
            "default": false
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "newest",
              "relevance",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Newest first, best match, or by price. Inside a cut search the order holds within each slice.",
            "default": "newest"
          },
          "onlyNew": {
            "title": "Only new ads",
            "type": "boolean",
            "description": "Output only ads that were not returned for the same search in the previous runs with the same monitor name (sorted by newest, up to 1 000 per search). Schedule the Actor to get new ads every hour.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps the memory of seen ads apart for different schedules."
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every request retry.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}