{
  "openapi": "3.0.1",
  "info": {
    "title": "SS.lv Scraper - Latvia Property Listings & Prices",
    "description": "Scrape SS.lv property listings across Latvia: asking price or monthly rent, rooms, area, floor, series, photos, coordinates and full advert text. Latvia's largest classifieds portal, in Latvian.",
    "version": "1.0",
    "x-build-id": "OPEU4ElUaVS5KPGkU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~ss-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-ss-property-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/sian.agency~ss-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-ss-property-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/sian.agency~ss-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-ss-property-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Pick one per run. Property Search walks SS.lv's own listing pages for any area it indexes and returns 30 listings per page, sale adverts and monthly rents alike, exactly as the site mixes them. Property Detail takes SS.lv advert URLs and returns the full advert text, every photo, the attribute table and the map coordinates.",
            "default": "search"
          },
          "section": {
            "title": "🏘️ Property section",
            "enum": [
              "flats",
              "homes-summer-residences",
              "farms-estates",
              "offices",
              "plots-and-lands",
              "wood"
            ],
            "type": "string",
            "description": "Which of SS.lv's property sections to read. Flats is the deep one — Rīga alone holds thousands of adverts across 49 districts. SS.lv keeps sale and rental adverts in the same feed, so both arrive in one run and the Deal type filter below decides which rows are kept.",
            "default": "flats"
          },
          "locations": {
            "title": "📍 Areas",
            "uniqueItems": true,
            "type": "array",
            "description": "Which parts of Latvia to read. Every value is SS.lv's own area, so the list is exactly what the site indexes — Rīga, Jūrmala, Rīgas rajons (the capital's commuter belt) and one entry per regions-and-town pair elsewhere. An area exists only in some sections (Rīga has no Forest or Farmsteads section), and a run naming a pair the site does not publish stops at validation, before anything is charged. A single district such as Centrs or Imanta is reached by pasting that district's SS.lv address…",
            "items": {
              "type": "string",
              "enum": [
                "riga",
                "jurmala",
                "riga-region",
                "aizkraukle-and-reg",
                "aluksne-and-reg",
                "balvi-and-reg",
                "bauska-and-reg",
                "cesis-and-reg",
                "daugavpils-and-reg",
                "dobele-and-reg",
                "gulbene-and-reg",
                "jekabpils-and-reg",
                "jelgava-and-reg",
                "kraslava-and-reg",
                "kuldiga-and-reg",
                "liepaja-and-reg",
                "limbadzi-and-reg",
                "ludza-and-reg",
                "madona-and-reg",
                "ogre-and-reg",
                "preili-and-reg",
                "rezekne-and-reg",
                "saldus-and-reg",
                "talsi-and-reg",
                "tukums-and-reg",
                "valka-and-reg",
                "valmiera-and-reg",
                "ventspils-and-reg",
                "flats-abroad-latvia",
                "houses-abroad-latvia",
                "other"
              ],
              "enumTitles": [
                "🏙️ Rīga — Rīga",
                "🏖️ Jūrmala — Jūrmala",
                "🗺️ Rīgas rajons — Rīga region",
                "🏙️ Aizkraukle un rajons",
                "🏙️ Alūksne un rajons",
                "🏙️ Balvi un rajons",
                "🏙️ Bauska un rajons",
                "🏙️ Cēsis un rajons",
                "🏙️ Daugavpils un rajons",
                "🏙️ Dobele un rajons",
                "🏙️ Gulbene un rajons",
                "🏙️ Jēkabpils un rajons",
                "🏙️ Jelgava un rajons",
                "🏙️ Krāslava un rajons",
                "🏙️ Kuldīga un rajons",
                "🏙️ Liepāja un rajons",
                "🏙️ Limbaži un rajons",
                "🏙️ Ludza un rajons",
                "🏙️ Madona un rajons",
                "🏙️ Ogre un rajons",
                "🏙️ Preiļi un rajons",
                "🏙️ Rēzekne un rajons",
                "🏙️ Saldus un rajons",
                "🏙️ Talsi un rajons",
                "🏙️ Tukums un rajons",
                "🏙️ Valka un rajons",
                "🏙️ Valmiera un rajons",
                "🏙️ Ventspils un rajons",
                "🌍 Dzīvokļi ārpus Latvijas — flats abroad (Flats section only)",
                "🌍 Mājas ārpus Latvijas — houses abroad (Houses section only)",
                "📍 Cits — other"
              ]
            },
            "default": [
              "riga"
            ]
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many listings across the whole run, not per area. One page carries 30 listings, so a run ends on the first page that crosses your limit. The budget is shared across every area you picked, so two areas each get roughly half of what you asked for rather than the first area taking it all.",
            "default": 100
          },
          "dealType": {
            "title": "🤝 Sale, rent or both",
            "enum": [
              "all",
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "SS.lv mixes sale and rental adverts in one feed, and the price text tells them apart (a monthly rent reads €/mēn.). Keep both, or keep only one kind. Filtered-out adverts are never saved and never charged.",
            "default": "all"
          },
          "minPrice": {
            "title": "💵 Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced below this. 0 means no lower bound. For a rental this is the monthly price. Listings with no price at all are kept whatever you set here.",
            "default": 0
          },
          "maxPrice": {
            "title": "💰 Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced above this. 0 means no upper bound.",
            "default": 0
          },
          "minArea": {
            "title": "📐 Min area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings smaller than this. 0 means no minimum. Only listings whose card shows an area in m² can be filtered this way; land rows show their area in the same column, in hectares where the site does.",
            "default": 0
          },
          "maxArea": {
            "title": "📏 Max area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings larger than this. 0 means no maximum.",
            "default": 0
          },
          "minRooms": {
            "title": "🛏️ Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Skip flats with fewer rooms than this. 0 means no minimum. The rooms column exists on the Flats section; other sections show something else there and are passed through untouched.",
            "default": 0
          },
          "includeDetails": {
            "title": "📄 Add full details",
            "type": "boolean",
            "description": "Open each listing's own advert page to add the untruncated advert text, the complete photo set instead of the one thumbnail on the card, the full attribute table (house type, comforts), the publication date and the map coordinates. Costs one extra request per listing and bills the Property Detail event on top of the listing row.",
            "default": false
          },
          "searchUrls": {
            "title": "🌐 Search URLs",
            "type": "array",
            "description": "Paste SS.lv listing addresses instead of filling the form. Build the view on ss.lv, copy the address bar, and the run reads exactly that page and pages forward from it — including district-level addresses such as https://www.ss.lv/lv/real-estate/flats/riga/centre/ that the Areas list does not reach. A page number in the address is dropped; the run starts at page one.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🏠 Advert URLs",
            "type": "array",
            "description": "Used by the Property Detail operation: SS.lv advert addresses to expand, e.g. https://www.ss.lv/msg/lv/real-estate/flats/riga/centre/adbgb.html.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}