{
  "openapi": "3.0.1",
  "info": {
    "title": "Allabolag Scraper - Swedish Company Data",
    "description": "Scrape allabolag.se for Swedish company financials, industry, status and board role titles by search, org number or URL. Monitor mode reports new and changed companies. $0.40 per 1,000 companies.",
    "version": "0.1",
    "x-build-id": "28KcdSISR9KmYvGoj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/redomic~allabolag-company-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-redomic-allabolag-company-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/redomic~allabolag-company-scraper/runs": {
      "post": {
        "operationId": "runs-sync-redomic-allabolag-company-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/redomic~allabolag-company-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-redomic-allabolag-company-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Company name or keyword to search (uses /what/<query>). You can also pass an organisation number, a company URL, or a search-result URL such as https://www.allabolag.se/bransch-sök?q=volvo&county=Skåne (filters and sort are reused)."
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Multiple search keywords, organisation numbers or allabolag URLs (company pages or search-result pages) to process.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "orgNumbers": {
            "title": "Organisation numbers",
            "type": "array",
            "description": "Swedish organisation numbers (10 digits, with or without dash) to fetch directly.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "A single allabolag.se URL: a company page (/5560360793/...) or a search-result page such as https://www.allabolag.se/bransch-sök?q=volvo&county=Skåne. A pasted search page keeps its q, county/industry filters and sort order.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Any allabolag.se URL: a company page (/5560360793/...) or a search-result page such as https://www.allabolag.se/bransch-sök?q=volvo&county=Skåne. A pasted search page keeps its q, county/industry filters and sort order, and the run continues with page=N while preserving those parameters.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "detail",
              "monitor"
            ],
            "type": "string",
            "description": "search = find companies by query; detail = fetch by org number/URL; monitor = report new/changed/removed companies since last run (uses a named key-value store). Tick 'New companies feed' to monitor newly registered companies instead.",
            "default": "search"
          },
          "newCompanies": {
            "title": "New companies feed",
            "type": "boolean",
            "description": "Report newly registered Swedish companies since the previous run (from /nystartade). Combine with county, municipality or industry filters for scheduled CRM/prospecting alerts. Uses the named key-value store.",
            "default": false
          },
          "enrichSearch": {
            "title": "Enrich search results",
            "type": "boolean",
            "description": "Default on: fetch each company's page and add detail-only fields (equity ratio, F-tax/VAT/payroll registration, share capital, status/legal form, registration date, CEO/board role titles, fiscal year) to every search row. A blocked or missing detail page keeps the lighter search row and the run still succeeds. Turn off to return only the fields on the search result cards.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum company rows to return.",
            "default": 50
          },
          "minRevenueKSEK": {
            "title": "Min revenue (kSEK)",
            "type": "integer",
            "description": "Optional: keep only companies with latest reported revenue (kSEK) at or above this value. Rows missing revenue are dropped when set."
          },
          "maxRevenueKSEK": {
            "title": "Max revenue (kSEK)",
            "type": "integer",
            "description": "Optional: keep only companies with latest reported revenue (kSEK) at or below this value. Rows missing revenue are dropped when set."
          },
          "minEmployees": {
            "title": "Min employees",
            "type": "integer",
            "description": "Optional: keep only companies with at least this many employees. Rows missing employees are dropped when set."
          },
          "maxEmployees": {
            "title": "Max employees",
            "type": "integer",
            "description": "Optional: keep only companies with at most this many employees. Rows missing employees are dropped when set."
          },
          "minEquityRatio": {
            "title": "Min equity ratio (%)",
            "type": "number",
            "description": "Optional: keep only companies with equity ratio (soliditet, %) at or above this value. Rows missing equity ratio are dropped when set."
          },
          "minRevenueGrowthPct": {
            "title": "Min revenue growth (%)",
            "type": "number",
            "description": "Optional: keep only companies with year-over-year revenue growth (%) at or above this value, computed from the latest vs prior fiscal year. Requires at least two years of accounts; rows missing growth are dropped when set."
          },
          "county": {
            "title": "County filter",
            "type": "string",
            "description": "Optional: keep only companies whose county contains this text (best-effort).",
            "default": ""
          },
          "municipality": {
            "title": "Municipality filter",
            "type": "string",
            "description": "Optional: keep only companies whose municipality contains this text (best-effort).",
            "default": ""
          },
          "sniCodes": {
            "title": "SNI industry codes",
            "type": "array",
            "description": "List every company registered under these SNI 2025 codes (e.g. 62.10 software, 69.201 accounting, 43.210 electricians; division 62 or section J also work). Combine with county or municipality to narrow server-side. Old SNI 2007 codes like 62010 match nothing.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "sniPrimaryOnly": {
            "title": "Main activity only",
            "type": "boolean",
            "description": "Keep only companies whose main SNI code is one of the codes above. allabolag also lists companies under their secondary codes (62.10 by revenue starts with Volvo Personvagnar); untick to get those too.",
            "default": true
          },
          "industry": {
            "title": "Industry filter",
            "type": "string",
            "description": "Optional: keep only companies whose industry/SNI text contains this text (best-effort). Used by the new companies feed and search.",
            "default": ""
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "revenueDesc",
              "revenueAsc",
              "numEmployeesDesc",
              "numEmployeesAsc"
            ],
            "type": "string",
            "description": "Server-side ordering for keyword searches (/what/<query>): relevance, revenueDesc, revenueAsc, numEmployeesDesc or numEmployeesAsc. Appends sort= to the search URL, so e.g. revenueDesc returns the biggest companies first without pasting a URL. A pasted search URL keeps its own sort.",
            "default": "relevance"
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. The default Apify proxy works for allabolag.se; if an exit IP is blocked, the run switches to a Swedish residential IP by itself.",
            "default": {
              "useApifyProxy": true
            }
          },
          "output": {
            "title": "Output mode",
            "enum": [
              "full",
              "diagnostic"
            ],
            "type": "string",
            "description": "full = push company rows and bill per result/change; diagnostic = preview with coverage/counts and up to 3 non-PII samples, no PII/contact fields, no PPE billing on preview rows.",
            "default": "full"
          },
          "activeOnly": {
            "title": "Only active companies",
            "type": "boolean",
            "description": "Keep only companies whose registry status is ACTIVE. Inactive, dissolved or companies with another status are excluded.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}