{
  "openapi": "3.0.1",
  "info": {
    "title": "SS.com Scraper: Latvia Classified Ads & Prices",
    "description": "Scrape classified ads from ss.com, Latvia's largest listings portal. Get listing titles, prices in EUR, item specs like car year, mileage, rooms, and floor, plus image links and ad URLs. Search any category by URL, filter by price and year, then export to Excel, Google Sheets, CSV, or JSON.",
    "version": "0.2",
    "x-build-id": "eWCf45E3NGFvpTPQU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~ss-com-latvia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-ss-com-latvia-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/getascraper~ss-com-latvia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-ss-com-latvia-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/getascraper~ss-com-latvia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-ss-com-latvia-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": {
          "category": {
            "title": "Inventory category",
            "enum": [
              "cars",
              "motorcycles",
              "trucks",
              "flats",
              "houses",
              "land",
              "commercial"
            ],
            "type": "string",
            "description": "Validated ss.com vehicle or property branch. Broad, unrelated sections are intentionally not supported.",
            "default": "cars"
          },
          "query": {
            "title": "Search keyword",
            "type": "string",
            "description": "Optional ss.com txt keyword applied to the category or direct source URL.",
            "default": ""
          },
          "categoryUrl": {
            "title": "Direct category URL",
            "type": "string",
            "description": "Optional ss.com or ss.lv vehicle/property category or filtered list URL. Unsupported sections are reported as an explicit failure.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional list of supported ss.com or ss.lv vehicle/property list URLs. Each object may provide inputId for source correlation.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minPrice": {
            "title": "Minimum price EUR",
            "minimum": 0,
            "type": "number",
            "description": "Only listings with a published EUR price at or above this value are returned."
          },
          "maxPrice": {
            "title": "Maximum price EUR",
            "minimum": 0,
            "type": "number",
            "description": "Only listings with a published EUR price at or below this value are returned."
          },
          "minYear": {
            "title": "Minimum vehicle year",
            "minimum": 1900,
            "type": "integer",
            "description": "Vehicle year lower bound. Listings without a published year do not pass this bound."
          },
          "maxYear": {
            "title": "Maximum vehicle year",
            "minimum": 1900,
            "type": "integer",
            "description": "Vehicle year upper bound. Listings without a published year do not pass this bound."
          },
          "minAreaM2": {
            "title": "Minimum property area m²",
            "minimum": 0,
            "type": "number",
            "description": "Property area lower bound in square metres. Missing source area does not pass this bound."
          },
          "maxAreaM2": {
            "title": "Maximum property area m²",
            "minimum": 0,
            "type": "number",
            "description": "Property area upper bound in square metres. Missing source area does not pass this bound."
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum returned listing records after filtering and deterministic sorting.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort field",
            "enum": [
              "listing_id",
              "price_eur",
              "year",
              "area_m2",
              "title",
              "retrievedAt"
            ],
            "type": "string",
            "description": "Stable sort field. Missing numeric values sort after published values.",
            "default": "listing_id"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Choose ascending or descending order for the selected sort field.",
            "default": "asc"
          },
          "monitorMode": {
            "title": "Monitor mode",
            "enum": [
              "snapshot",
              "changes"
            ],
            "type": "string",
            "description": "snapshot returns the current complete result set. changes returns NEW, UPDATED, PRICE_CHANGED, STATUS_CHANGED, REAPPEARED, and evidence-backed EXPIRED rows.",
            "default": "snapshot"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Named history in the Actor key-value store. Required for changes mode. Reuse the same key for a recurring monitor.",
            "default": ""
          },
          "emitUnchanged": {
            "title": "Emit unchanged rows",
            "type": "boolean",
            "description": "In changes mode, also return rows whose source fields did not change.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify proxy settings for public ss.com requests.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}