{
  "openapi": "3.0.1",
  "info": {
    "title": "Greek Business Leads: New Business Alerts from XO.gr",
    "description": "Get Greek business leads from xo.gr (Chrysos Odigos, the Greek Yellow Pages) by category and place, and get alerted when new businesses appear. Phones, mobile, email, website, address and GPS. Search in English or Greek. Webhook or Telegram alerts.",
    "version": "0.1",
    "x-build-id": "RVoV1L2gP6vXxVfqY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~xo-gr-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-xo-gr-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/fayoussef~xo-gr-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-xo-gr-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/fayoussef~xo-gr-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-xo-gr-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": {
          "search_terms": {
            "title": "What to search for",
            "type": "array",
            "description": "Business categories, products or business names, one per line, in English or Greek ('lawyers' or 'δικηγόροι', 'car rental', 'ζαχαροπλαστεία'). Exactly what you would type in xo.gr's search box. Each term is searched in every location.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Where",
            "type": "array",
            "description": "Places in Greece, one per line: a municipality, an area or a region, in Greek or Latin letters ('Glyfada', 'Kalamaria', 'Athens', 'Θεσσαλονίκη', 'Νότια Προάστια Αθήνας', 'Κρήτη'). Regions work best in Greek. Leave empty to search all of Greece. xo.gr shows about 300 results per search, so for a big category list several places instead of one broad one.",
            "items": {
              "type": "string"
            }
          },
          "max_items": {
            "title": "Max businesses",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many businesses across all searches. Leave empty for no limit. Free-plan runs are capped at 25."
          },
          "include_details": {
            "title": "Add fax, contact person, hours and rating",
            "type": "boolean",
            "description": "Open each business's xo.gr profile to add fax, contact person, legal company name, opening hours, rating, review count, description and social links. Phones, email, website, address and GPS come without it. One extra page per business, so a run with it on is slower.",
            "default": false
          },
          "skip_sponsored": {
            "title": "Skip sponsored listings",
            "type": "boolean",
            "description": "xo.gr shows paid listings at the top of every search, and many are located outside the searched place. Turn this on to keep only the organic results. Skipped listings are not charged. Every row also carries an 'is_sponsored' flag, so you can filter later instead.",
            "default": false
          },
          "download_logos": {
            "title": "Show logos everywhere",
            "type": "boolean",
            "description": "xo.gr only serves its images to visitors in Greece, so its logo links do not open anywhere else (and show as 'Proxied content' in the results table). With this on, each logo is copied to your run's storage and the 'logo' field links to the copy, which opens from any country. The original link stays in 'logo_original'.",
            "default": true
          },
          "monitor_mode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Return only businesses not seen in a previous run of the same watchlist. The first run saves a baseline and returns nothing. Off by default, so existing saved inputs keep scraping everything. Needs a paid plan.",
            "default": false
          },
          "watchlist_name": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Names the saved snapshot. Leave empty and it is derived from your search terms and locations, so a schedule needs no naming."
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "A Discord, Slack or generic https webhook URL (Make, Zapier, n8n). One message per run, only when something changed. Kept secret. Do not put it in a public task."
          },
          "alertTelegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional. Create a bot with @BotFather on Telegram and paste its token here. Kept secret."
          },
          "alertTelegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional. The chat the bot should message: your own chat ID, or a group or channel the bot was added to."
          },
          "start_urls": {
            "title": "Start URLs",
            "type": "array",
            "description": "xo.gr search URLs (https://www.xo.gr/search/?what=...), category pages (https://www.xo.gr/dir-az/...) or single business profiles (https://www.xo.gr/profile/...).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "max_pages": {
            "title": "Max pages per search",
            "minimum": 1,
            "type": "integer",
            "description": "How many result pages (20 businesses each) to read per search or URL. Leave empty to read every page xo.gr serves."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}