{
  "openapi": "3.0.1",
  "info": {
    "title": "Norway Bankruptcy Notices Scraper — Brreg Konkurs Gazette",
    "description": "Scrape Norway's official bankruptcy gazette (Brønnøysund konkurskunngjøringer): company, org number, notice type, court, case number, trustee name + e-mail, claim deadline, fristdag and first creditors' meeting. Filter by date, county, municipality and NACE industry. No login.",
    "version": "0.1",
    "x-build-id": "9gpdhtutKLKX7fcFZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~brreg-bankruptcy-notices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-brreg-bankruptcy-notices-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/scrapersdelight~brreg-bankruptcy-notices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-brreg-bankruptcy-notices-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/scrapersdelight~brreg-bankruptcy-notices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-brreg-bankruptcy-notices-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": {
          "lastNDays": {
            "title": "Last N days (rolling window)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Scrape the last N days of notices, ending today. Best choice for a scheduled monitor. Overrides the fixed date range below when set. Leave empty and set the two dates instead for a historical sweep. With neither set, the actor uses the last 7 days."
          },
          "datoFra": {
            "title": "Date from (dd.mm.yyyy)",
            "type": "string",
            "description": "Start of a fixed date range, e.g. 01.08.2026. Used only when 'Last N days' is empty. The archive reaches back years."
          },
          "datoTil": {
            "title": "Date to (dd.mm.yyyy)",
            "type": "string",
            "description": "End of a fixed date range, e.g. 31.08.2026. Used only when 'Last N days' is empty."
          },
          "windowDays": {
            "title": "Slice size in days (reliability lever)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "The register streams slowly and its response grows with the range: a 3-month request hard-fails at 60s. The crawler therefore splits your range into slices of this many days. Measured: 14-day slices scored 25/26 (96.2%) across a full year, monthly slices only 9/12 (75%). Leave at 14 unless you have a reason. Slicing is lossless — a 31-day window and the same range as 5 weekly slices both returned exactly 695 unique notices.",
            "default": 14
          },
          "noticeCategory": {
            "title": "Notice category",
            "enum": [
              "51",
              "1",
              "2",
              "3",
              "6",
              "9",
              "62",
              "70",
              "71",
              "76",
              "81",
              "110",
              "111",
              "112"
            ],
            "type": "string",
            "description": "Which family of Brreg gazette notices to read. Default 51 = Konkurs/tvangsavvikling (bankruptcy, compulsory dissolution and liquidation) — the insolvency lane this actor is built and priced for. Industry filters are only honoured for category 51; the register ignores them for every other category.",
            "default": "51"
          },
          "noticeTypes": {
            "title": "Notice sub-types (server-side)",
            "type": "array",
            "description": "Restrict to specific sub-types within the chosen category. Leave empty for all of them (one request instead of one per type — faster). Codes shown are for category 51. The actor issues one request per selected sub-type and merges the results, deduplicated by notice id.",
            "items": {
              "type": "string",
              "enum": [
                "52",
                "53",
                "54",
                "55",
                "56",
                "57",
                "58",
                "59",
                "60",
                "61",
                "73",
                "74"
              ],
              "enumTitles": [
                "52 — Konkurs, bobehandling avsluttet",
                "53 — Konkurs, bobehandling fortsettes",
                "54 — Konkurs, bobehandling innstilt",
                "55 — Konkurs, oppheving",
                "56 — Konkursåpning (bankruptcy opened)",
                "57 — Konkurs, omgjøring",
                "58 — Tvangsavvikling, oppheving",
                "59 — Tvangsavvikling, varsel",
                "60 — Tvangsavvikling, åpning",
                "61 — Tvangsavvikling, omgjøring",
                "73 — Tvangsoppløsning, åpning",
                "74 — Tvangsoppløsning, oppheving"
              ]
            },
            "default": []
          },
          "excludeNoticeTypes": {
            "title": "Exclude notice sub-types",
            "type": "array",
            "description": "Drop these sub-types after parsing. Handy to keep openings and discard closures: exclude 52 and 54 to remove 'bobehandling avsluttet' and 'innstilt', which carry no trustee or claim deadline. A notice whose label is not recognised is never dropped.",
            "items": {
              "type": "string",
              "enum": [
                "52",
                "53",
                "54",
                "55",
                "56",
                "57",
                "58",
                "59",
                "60",
                "61",
                "73",
                "74"
              ],
              "enumTitles": [
                "52 — Konkurs, bobehandling avsluttet",
                "53 — Konkurs, bobehandling fortsettes",
                "54 — Konkurs, bobehandling innstilt",
                "55 — Konkurs, oppheving",
                "56 — Konkursåpning (bankruptcy opened)",
                "57 — Konkurs, omgjøring",
                "58 — Tvangsavvikling, oppheving",
                "59 — Tvangsavvikling, varsel",
                "60 — Tvangsavvikling, åpning",
                "61 — Tvangsavvikling, omgjøring",
                "73 — Tvangsoppløsning, åpning",
                "74 — Tvangsoppløsning, oppheving"
              ]
            },
            "default": []
          },
          "region": {
            "title": "Region",
            "enum": [
              "0",
              "100",
              "200",
              "300",
              "400",
              "500",
              "600",
              "999"
            ],
            "type": "string",
            "description": "Region of the debtor's registered address. 0 = the whole country (default).",
            "default": "0"
          },
          "county": {
            "title": "County (fylke)",
            "enum": [
              "",
              "3",
              "11",
              "15",
              "18",
              "21",
              "22",
              "23",
              "31",
              "32",
              "33",
              "34",
              "39",
              "40",
              "42",
              "46",
              "50",
              "55",
              "56",
              "99"
            ],
            "type": "string",
            "description": "County number. Must sit inside the selected region — the actor validates the pair and names the valid counties if it does not. Leave empty for all counties.",
            "default": ""
          },
          "municipality": {
            "title": "Municipality number (kommunenummer)",
            "type": "string",
            "description": "Four-digit municipality number, e.g. 301 for Oslo, 1103 for Stavanger, 4601 for Bergen. Requires a county to be set; the actor checks the municipality really belongs to it. Leave empty for all.",
            "default": ""
          },
          "industrySection": {
            "title": "Industry section (NACE A–V)",
            "enum": [
              "0",
              "65",
              "66",
              "67",
              "68",
              "69",
              "70",
              "71",
              "72",
              "73",
              "74",
              "75",
              "76",
              "77",
              "78",
              "79",
              "80",
              "81",
              "82",
              "83",
              "84",
              "85",
              "86"
            ],
            "type": "string",
            "description": "Filter by the debtor's industry. This is the single highest-value filter for niche lead generation — 'construction companies that went bankrupt in Vestland last month' is one run. Only honoured for notice category 51. The chosen section's name is echoed back on every row as filterIndustrySectionName; the debtor's OWN industry is the separate `industry` field (and entity.naceCode when the company-register join is on).",
            "default": "0"
          },
          "industryDivision": {
            "title": "Industry division (NACE 2-digit)",
            "type": "string",
            "description": "Narrow within the section, e.g. 41 = construction of buildings, 43 = specialised construction, 56 = food & beverage service. Requires the matching industry section; the actor rejects a mismatched pair rather than silently returning unfiltered rows. Echoed back on every row as filterIndustryDivisionName.",
            "default": ""
          },
          "industryGroup": {
            "title": "Industry group (NACE 3-digit)",
            "type": "string",
            "description": "Narrowest industry filter, e.g. 210 under division 43 = electrical installation. Requires the division, because group codes are only unique WITHIN a division (NACE 01.11 and 03.11 both submit 110). An unknown code is rejected with the list of valid groups for your division. Echoed back on every row as filterIndustryGroupName.",
            "default": ""
          },
          "language": {
            "title": "Notice language",
            "enum": [
              "nb",
              "en"
            ],
            "type": "string",
            "description": "The register publishes each notice in Norwegian and in its own official English translation. 'en' returns English notice text and English field labels; the parser reads both. Company names, dates and case numbers are identical either way.",
            "default": "nb"
          },
          "companyNameContains": {
            "title": "Company name contains",
            "type": "string",
            "description": "Keep only notices whose company name contains this text (case-insensitive).",
            "default": ""
          },
          "orgNumbers": {
            "title": "Only these organisation numbers",
            "type": "array",
            "description": "Watch a specific portfolio: keep only notices for these 9-digit Norwegian org numbers. Applied over the date window you scrape, so widen the window when checking a portfolio.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includePersonalBankruptcies": {
            "title": "Include personal bankruptcies",
            "type": "boolean",
            "description": "Off by default. About 3% of gazette notices concern a NATURAL PERSON rather than a company (measured 2026-09-05: 15 of 547 notices in a 14-day country-wide window). On those rows the register prints a 6-digit DDMMYY DATE OF BIRTH where a company would have its organisation number. The actor never writes that value into orgNumber, but it IS emitted verbatim in registryId, and it also appears inside detailUrl as the sokeverdi parameter — next to the individual's full name in companyName. That is personal data under GDPR. These rows are not business leads, so they are excluded unless you explicitly opt in; if you do, you take on the controller responsibility for it.",
            "default": false
          },
          "onlyNoticesWithTrustee": {
            "title": "Only notices that name a trustee (bostyrer)",
            "type": "boolean",
            "description": "The debt-collection and insolvency-services filter: drop closure notices that carry no bostyrer, so every row has a named contact to approach. Requires detail fetching, and every candidate in your window is detail-checked before the filter runs — 'Maximum detail fetches' is ignored so the filter can never answer from a truncated sample. Cap the bill with 'Maximum notices to return'.",
            "default": false
          },
          "claimDeadlineAfter": {
            "title": "Claim deadline on or after",
            "type": "string",
            "description": "Keep only notices whose creditor claim deadline falls on or after this date (YYYY-MM-DD or dd.mm.yyyy). Use it to surface estates you can still file a claim against. Requires detail fetching; rows without a deadline are excluded while this filter is set. Every candidate in your window is detail-checked before the filter runs — 'Maximum detail fetches' is ignored so the filter cannot answer from a truncated sample; cap the bill with 'Maximum notices to return'.",
            "default": ""
          },
          "claimDeadlineBefore": {
            "title": "Claim deadline on or before",
            "type": "string",
            "description": "Keep only notices whose creditor claim deadline falls on or before this date (YYYY-MM-DD or dd.mm.yyyy). Same as the bound above: it requires detail fetching, every candidate in your window is checked, and rows with no deadline are excluded while it is set.",
            "default": ""
          },
          "onlyNew": {
            "title": "Only notices not seen before",
            "type": "boolean",
            "description": "For scheduled monitors: emit only notices whose id is not already in the named key-value store below, then record what was delivered. The store is NAMED and therefore survives between runs.",
            "default": false
          },
          "seenStoreName": {
            "title": "Name of the 'already seen' key-value store",
            "type": "string",
            "description": "Named key-value store backing 'Only new'. Use a distinct name per saved search so two monitors do not share a memory.",
            "default": "brreg-bankruptcy-notices-seen"
          },
          "fetchDetails": {
            "title": "Fetch the full notice detail",
            "type": "boolean",
            "description": "On by default, and the reason this actor exists: the detail page is the ONLY place that carries the court, case number, trustee name and e-mail, claim deadline, cut-off date (fristdag) and first creditors' meeting. Brreg's free open-data API exposes none of them — it has only a bare konkurs true/false flag. Turn off for a cheap list-only sweep.",
            "default": true
          },
          "includeTrusteeContact": {
            "title": "Include trustee name, e-mail and address",
            "type": "boolean",
            "description": "Emit trusteeName, trusteeEmails, trusteeEmail and trusteeAddress. These are a named individual's professional contact details — see the README's GDPR note.",
            "default": true
          },
          "includeFullNoticeText": {
            "title": "Include the full notice text",
            "type": "boolean",
            "description": "Add noticeText, the complete published wording of the notice as plain text.",
            "default": false
          },
          "includeRawNoticeHtml": {
            "title": "Include the raw notice HTML",
            "type": "boolean",
            "description": "Add rawNoticeHtml, the register's own notice fragment, for buyers who want to re-parse or archive it verbatim. Makes rows much larger.",
            "default": false
          },
          "enrichWithEntityRegistry": {
            "title": "Enrich from the open company register (free)",
            "type": "boolean",
            "description": "Join each company to Brreg's open Enhetsregisteret API for NACE code and description, legal form, registration and founding dates, employee count, VAT registration, website and business address. Free, no key, no extra charge — one extra request per company. Companies the register has already DELETED (common on closure notices) return name and legal form only: measured 2026-09-05, 142 of 316 rows came back with a NACE code, all 316 with a legal form (run x3VQY4wlA6BrJ5nyQ).",
            "default": false
          },
          "maxItems": {
            "title": "Maximum notices to return",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on delivered rows, and therefore on your bill — applied last, after every filter, so it never changes which notices match. Defaults to 50 so a run started with no input stays cheap; raise it for real sweeps. 0 means no cap.",
            "default": 50
          },
          "maxDetailFetches": {
            "title": "Maximum detail fetches",
            "minimum": 0,
            "type": "integer",
            "description": "Caps the paid enrichment event on a plain sweep: the first 25 delivered rows are enriched and the rest arrive list-only with detailFetched: false. Set 0 to enrich every delivered row. IT DOES NOT APPLY when a detail-dependent filter is on — 'Only notices that name a trustee', either claim-deadline bound, or sorting by claim deadline. Those are judged ON the detail page, so detail is fetched for every candidate in your window first (the run log says so when it happens) and the bill stays capped by 'Maximum notices to return' instead. Capping the fetch there would silently discard never-examined candidates as non-matching.",
            "default": 25
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "noticeDate",
              "companyName",
              "county",
              "claimDeadline"
            ],
            "type": "string",
            "description": "Field to order the dataset by. 'claimDeadline' requires detail fetching and is only meaningful across every candidate, so choosing it detail-fetches the whole window before sorting and ignores 'Maximum detail fetches'. The cap on delivered rows still applies afterwards.",
            "default": "noticeDate"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction for the sort field. Notices with no value for the chosen field are always placed last, whichever direction you pick.",
            "default": "desc"
          },
          "detailConcurrency": {
            "title": "Detail fetch concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Parallel detail requests. Measured on the live register: 4/4 in 2.4s and 8/8 in 2.8s with no throttling. 8 is the tested default.",
            "default": 8
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout. The register is slow on wide ranges; keep the slice size small rather than raising this.",
            "default": 60
          },
          "maxRequestRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "The register's observed failure mode is a transient ECONNRESET / connection error that succeeds on retry, so retries matter more than proxy class. Each retry takes a fresh proxy IP.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify datacenter proxy is the default and is enough: datacenter, Norwegian residential and US residential all returned byte-identical pages when measured. Residential costs more for no gain. The country pin is exposed for buyers bringing their own proxies.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}