{
  "openapi": "3.0.1",
  "info": {
    "title": "Bolagsplatsen Scraper – Swedish Businesses for Sale",
    "description": "Scrape business-for-sale listings (företag till salu) from Bolagsplatsen.se, the Swedish marketplace for buying and selling companies. Get asking price, turnover, profit status, employees, industry, location, broker and more as clean JSON/CSV/Excel.",
    "version": "1.0",
    "x-build-id": "cgzDau0t6QyiKpdcU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/outlandish_mainsail~bolagsplatsen-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-outlandish_mainsail-bolagsplatsen-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/outlandish_mainsail~bolagsplatsen-scraper/runs": {
      "post": {
        "operationId": "runs-sync-outlandish_mainsail-bolagsplatsen-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/outlandish_mainsail~bolagsplatsen-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-outlandish_mainsail-bolagsplatsen-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": {
          "maxItems": {
            "title": "Max listings",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to save (after filters). Listings are processed newest first (by sitemap last-modified date). Set 0 for no limit (all ~2,800 listings in the sitemap).",
            "default": 100
          },
          "startUrls": {
            "title": "Specific listing URLs (optional)",
            "type": "array",
            "description": "Scrape only these listing pages, e.g. https://www.bolagsplatsen.se/foretag-till-salu/some-company-91593. Leave empty to discover all listings from the sitemap. Search/category URLs are not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "includeSold": {
            "title": "Include sold listings",
            "type": "boolean",
            "description": "The sitemap also contains listings that are already sold (marked 'SÅLD'). Sold pages still show turnover, price range, employees, location and the sale date, which is useful for valuation benchmarks. Off by default.",
            "default": false
          },
          "modifiedSince": {
            "title": "Only listings updated since",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\d+\\s*(day|days|d|week|weeks|w|month|months|m))?$",
            "type": "string",
            "description": "Only fetch listings whose sitemap last-modified date is on or after this date. Use YYYY-MM-DD or a relative value such as '7 days', '2 weeks' or '1 month'. The site does not show a publication date on active listings, so this uses the sitemap <lastmod> date (for sold listings it equals the sale date)."
          },
          "skipPreviouslyScraped": {
            "title": "Only new listings since the last run",
            "type": "boolean",
            "description": "Remember listing IDs across runs (in a named key-value store 'bolagsplatsen-scraper-seen' in your account) and skip listings already scraped in an earlier run. Ideal for scheduled monitoring of new businesses for sale.",
            "default": false
          },
          "seenListingsKey": {
            "title": "State key for 'only new listings'",
            "type": "string",
            "description": "Name of the record that stores already-scraped listing IDs. Use a different key per saved task/filter set if you monitor several searches separately. Only listings that were actually saved (matched your filters) are remembered.",
            "default": "SEEN_IDS"
          },
          "categories": {
            "title": "Category / industry contains",
            "type": "array",
            "description": "Keep only listings whose category or industry tags contain any of these words (case-insensitive), e.g. 'Restaurang', 'E-handel', 'Bygg', 'Mat & dryck', 'Tjänsteföretag'.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Location contains",
            "type": "array",
            "description": "Keep only listings whose location (district, municipality, county/län or region) contains any of these words, e.g. 'Stockholm', 'Skåne', 'Göteborg', 'Norrland'.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords in title/description",
            "type": "array",
            "description": "Keep only listings whose title or description contains any of these words (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "minAskingPrice": {
            "title": "Min asking price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price (prisidé) in SEK. Price ranges such as '2-5 Mkr' match if they overlap the requested range."
          },
          "maxAskingPrice": {
            "title": "Max asking price (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price (prisidé) in SEK."
          },
          "minTurnover": {
            "title": "Min turnover (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum yearly turnover (omsättning) in SEK."
          },
          "maxTurnover": {
            "title": "Max turnover (SEK)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum yearly turnover (omsättning) in SEK."
          },
          "includeListingsWithoutPrice": {
            "title": "Keep listings without the filtered value",
            "type": "boolean",
            "description": "Many sellers do not publish an asking price or turnover. When a price/turnover filter is set, keep (true) or drop (false) listings that do not show that value.",
            "default": true
          },
          "advertiserType": {
            "title": "Advertiser type",
            "enum": [
              "any",
              "broker",
              "owner"
            ],
            "type": "string",
            "description": "Filter by who placed the ad.",
            "default": "any"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not required: the site works without proxies. Enable Apify Proxy only if you run into blocking.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel requests. Keep this low to be polite to the website.",
            "default": 3
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Rate limit for page requests.",
            "default": 60
          },
          "delayBetweenRequestsSecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Minimum delay between two requests to bolagsplatsen.se. Default 1 second (about 60 pages per minute at most).",
            "default": 1
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "User-Agent header sent with each request.",
            "default": "Mozilla/5.0 (compatible; BolagsplatsenScraper/1.0; Apify Actor; polite crawler, respects robots.txt)"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}