{
  "openapi": "3.0.1",
  "info": {
    "title": "DOMOVOY Prague Flat Rentals",
    "description": "Finds rental flats in Prague (Vinohrady for now) on Sreality, Bezrealitky and iDNES, merges duplicates across portals, extracts fees with an LLM and computes the real monthly and move-in cost. Optionally writes the shortlist to Notion.",
    "version": "0.2",
    "x-build-id": "DR0MftheGGskivNfR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vladb~prague-flat-rentals/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vladb-prague-flat-rentals",
        "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/vladb~prague-flat-rentals/runs": {
      "post": {
        "operationId": "runs-sync-vladb-prague-flat-rentals",
        "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/vladb~prague-flat-rentals/run-sync": {
      "post": {
        "operationId": "run-sync-vladb-prague-flat-rentals",
        "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": [
          "profile"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "katastr_lookup"
            ],
            "type": "string",
            "description": "search collects listings from the portals in profile.filters.sources (Sreality, Bezrealitky, iDNES). katastr_lookup is reserved for a later version and returns NOT_IMPLEMENTED.",
            "default": "search"
          },
          "profile": {
            "title": "Search profile",
            "type": "object",
            "description": "What to search for and what the flat must meet. filters: offer_type \"rent\", property_type \"flat\", locations (city, optional citypart), dispositions (for example \"2+kk\"), max_rent and min_area_m2 in CZK and m2, sources (sreality, bezrealitky, idnes) and max_listings per source. requirements: max_total_monthly (CZK, required), max_upfront, elevator (\"required\" or null), lease_types (najem, podnajem), move_in_by (YYYY-MM-DD) and pets_allowed. id names the profile; household.occupants sets the per-person fees. Full schema: domovoy/schemas/profile.schema.json in the source."
          },
          "notion": {
            "title": "Notion",
            "type": "object",
            "description": "Optional. Without dataSourceId, results go to the dataset only. With it, flats are written to a Notion database with the DOMOVOY shortlist schema, and that schema is checked before any portal is contacted.",
            "properties": {
              "dataSourceId": {
                "title": "Data source ID",
                "type": "string",
                "description": "Notion data source ID of the DOMOVOY shortlist database."
              }
            }
          },
          "notionToken": {
            "title": "Notion token",
            "type": "string",
            "description": "Optional. Token of your Notion integration, needed only with notion.dataSourceId. Falls back to the environment variable NOTION_TOKEN, which the public Actor does not set."
          },
          "llm": {
            "title": "LLM settings",
            "type": "object",
            "description": "Extraction settings. Each listing is tried on the Featherless model (Qwen, two attempts within the per-flat budget), then once on the OpenAI fallback model (gpt-6-luna, reasoning effort medium).",
            "properties": {
              "model": {
                "title": "Model",
                "type": "string",
                "description": "Primary Featherless model id (Qwen). Tried with two attempts before the fallback.",
                "default": "Qwen/Qwen3-30B-A3B-Instruct-2507"
              },
              "fallbackModel": {
                "title": "Fallback model",
                "type": "string",
                "description": "OpenAI fallback model, the only fallback: tried once, at reasoning effort medium, when Qwen has no valid answer. Needs an OpenAI key. Id checked on GET /v1/models.",
                "default": "gpt-6-luna"
              },
              "concurrency": {
                "title": "Concurrency",
                "type": "integer",
                "description": "Featherless concurrent units the run may hold at once. A Qwen3-30B call takes 1 unit; OpenAI fallback calls take none. The plan allows 100 (GET /v1/plan).",
                "default": 40,
                "minimum": 1
              },
              "timeoutSec": {
                "title": "Timeout (seconds)",
                "type": "integer",
                "description": "Timeout per Qwen call attempt. Answers take 7 to 12 s, a cold first call 5 to 15 s. The OpenAI fallback gets at least 30 s.",
                "default": 20,
                "minimum": 1
              },
              "flatBudgetSec": {
                "title": "Per-flat budget (seconds)",
                "type": "integer",
                "description": "Time one flat may spend inside Qwen requests (waiting for a slot does not count). Then the OpenAI fallback gets one call. If the flat still has no answer and time ran out, it goes on with extraction status timeout and 'fees not extracted yet' in its unknowns; nothing is cached, so the next run extracts it again and delivers it as changed.",
                "default": 45,
                "minimum": 1
              }
            }
          },
          "featherlessApiKey": {
            "title": "Featherless API key",
            "type": "string",
            "description": "Optional, your own key. Used for the primary model (llm.model, Qwen on Featherless). Without a Featherless or OpenAI key, fees are not extracted and stay unknown. Falls back to the environment variable FEATHERLESS_API_KEY, which the public Actor does not set."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Optional, your own key. Used for the fallback model (llm.fallbackModel), tried once when Qwen has no valid answer. Falls back to the environment variable OPENAI_API_KEY, which the public Actor does not set."
          },
          "includeUnchanged": {
            "title": "Include unchanged flats",
            "type": "boolean",
            "description": "Push flats that did not change since the last run to the dataset. With this on, unchanged flats are also written to Notion again (idempotent by Property ID; Status is never overwritten).",
            "default": false
          },
          "skipExtraction": {
            "title": "Skip extraction",
            "type": "boolean",
            "description": "Debug only. Skips the LLM extraction; costs and requirements then run on unknown fields.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not used yet: the Actor makes direct requests to the portals, with a delay between requests to each portal.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}