# Search company index

Search the Norwegian company index using text, registry filters or a similar company's organisation number. Results include registry facts and matching companies.

POST https://api.brigg.app/v1/operations/customers.SearchCompanyIndex

## Access & visibility

Allow `customers.SearchCompanyIndex` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Free-text search over company names, registry profiles and scraped site content (keyword + meaning). Omit for a pure filter listing. At least 1 character. At most 400 characters. |
| `similar_to` | string | No | Find companies SIMILAR to this one (9-digit org number) — its indexed profile is the query. Combine with filters (e.g. kommune) to scope the result. Pattern: `^\d{9}$`. |
| `nace_prefix` | array of string | No | SN2025 NACE code prefixes, e.g. ['62'] for IT services or ['69.20'] for accounting. A company matches when any of its codes starts with a prefix. Checked against the register's own SN2025 vocabulary — a retired SN2007 code is REFUSED rather than silently matching nothing, so when you are unsure of the code, search by industry name in `query` instead. At most 10 items. |
| `kommune` | array of string | No | Norwegian kommune numbers (4 digits), e.g. ['0301'] for Oslo. Checked against the register's current list — the 2020 and 2024 reforms renumbered municipalities, and a pre-reform number is REFUSED rather than matching nothing. At most 20 items. |
| `employees_min` | integer | No | Minimum employee count for matching companies. Minimum: 0. |
| `employees_max` | integer | No | Maximum employee count for matching companies. Minimum: 0. |
| `founded_from` | string | No | Founded on/after this ISO date (YYYY-MM-DD). Pattern: `^\d{4}-\d{2}-\d{2}$`. |
| `founded_to` | string | No | Founded on/before this ISO date (YYYY-MM-DD). Pattern: `^\d{4}-\d{2}-\d{2}$`. |
| `org_form` | array of string | No | Organisation forms, e.g. ['AS'] or ['AS','ASA']. At most 10 items. |
| `has_website` | boolean | No | true = only companies with a linked website. |
| `limit` | integer | No | Number of results to request per page. Maximum: 25. Greater than 0. |

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `hits` | array of [CompanySearchHit](#companysearchhit-response-hits) | Yes | Matching company records, in the returned search order. |

### CompanySearchHit · response.hits[]

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `org_number` | string | Yes | Official organization number as text; preserve leading zeros. |
| `name` | string | Yes | Display name. |
| `org_form` | null or string | Yes | Legal organization form code used by the register. |
| `nace` | array of string | Yes | Industry classification codes supplied by the register. |
| `industry_label` | null or string | Yes | Human-readable industry classification. |
| `kommune` | null or string | Yes | Norwegian municipality code supplied by the register. |
| `city` | null or string | Yes | Postal town or city. |
| `employees` | null or number | Yes | Employee count reported by the source. |
| `founded_date` | null or string | Yes | Company founding date from the register. |
| `latest_revenue` | null or [object](#response-hits-latest-revenue) | Yes | Revenue from the latest available financial report. |
| `domains` | array of string | Yes | Web domains associated with the company. |
| `emails` | array of string | Yes | Additional email addresses. |
| `daglig_leder` | null or string | Yes | Managing director reported by the Norwegian register. |
| `score` | number | Yes | Score assigned to this result. Use the operation's scale and constraints when interpreting it. |
| `channels` | array of string | Yes | Channels contributing to this result or selected for this operation. Each item: `"keyword"`, `"semantic"`. |
| `snippet` | string | Yes | A short excerpt showing why the result matched. |

### response.hits[].latest_revenue

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `fiscal_year` | number | Yes | Fiscal year to which these financial figures apply. |
| `revenue` | null or number | Yes | Revenue in the source financial report's units. |

## Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. |

## Next steps

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/customers.SearchCompanyIndex' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{}'
```

#### TypeScript


```typescript
const response = await fetch("https://api.brigg.app/v1/operations/customers.SearchCompanyIndex", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = {}
request = Request(
    "https://api.brigg.app/v1/operations/customers.SearchCompanyIndex",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "hits": [
    {
      "org_number": "999999999",
      "name": "Northstar Consulting AS",
      "org_form": "AS",
      "nace": [
        "62.020"
      ],
      "industry_label": "IT consulting",
      "kommune": "0301",
      "city": null,
      "employees": null,
      "founded_date": null,
      "latest_revenue": null,
      "domains": [],
      "emails": [],
      "daglig_leder": "Alex Morgan",
      "score": 1,
      "channels": [],
      "snippet": "IT consulting and onboarding services."
    }
  ]
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 400,
      "description": "Free-text search over company names, registry profiles and scraped site content (keyword + meaning). Omit for a pure filter listing."
    },
    "similar_to": {
      "type": "string",
      "pattern": "^\\d{9}$",
      "description": "Find companies SIMILAR to this one (9-digit org number) — its indexed profile is the query. Combine with filters (e.g. kommune) to scope the result."
    },
    "nace_prefix": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 8
      },
      "maxItems": 10,
      "description": "SN2025 NACE code prefixes, e.g. ['62'] for IT services or ['69.20'] for accounting. A company matches when any of its codes starts with a prefix. Checked against the register's own SN2025 vocabulary — a retired SN2007 code is REFUSED rather than silently matching nothing, so when you are unsure of the code, search by industry name in `query` instead."
    },
    "kommune": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^\\d{4}$"
      },
      "maxItems": 20,
      "description": "Norwegian kommune numbers (4 digits), e.g. ['0301'] for Oslo. Checked against the register's current list — the 2020 and 2024 reforms renumbered municipalities, and a pre-reform number is REFUSED rather than matching nothing."
    },
    "employees_min": {
      "type": "integer",
      "minimum": 0,
      "description": "Minimum employee count for matching companies."
    },
    "employees_max": {
      "type": "integer",
      "minimum": 0,
      "description": "Maximum employee count for matching companies."
    },
    "founded_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Founded on/after this ISO date (YYYY-MM-DD)."
    },
    "founded_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Founded on/before this ISO date (YYYY-MM-DD)."
    },
    "org_form": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 10
      },
      "maxItems": 10,
      "description": "Organisation forms, e.g. ['AS'] or ['AS','ASA']."
    },
    "has_website": {
      "type": "boolean",
      "description": "true = only companies with a linked website."
    },
    "limit": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 25,
      "description": "Number of results to request per page."
    }
  },
  "additionalProperties": false,
  "examples": [
    {}
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "hits": {
      "type": "array",
      "items": {
        "title": "CompanySearchHit",
        "type": "object",
        "properties": {
          "org_number": {
            "type": "string",
            "description": "Official organization number as text; preserve leading zeros."
          },
          "name": {
            "type": "string",
            "description": "Display name."
          },
          "org_form": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Legal organization form code used by the register."
          },
          "nace": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Industry classification codes supplied by the register."
          },
          "industry_label": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Human-readable industry classification."
          },
          "kommune": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Norwegian municipality code supplied by the register."
          },
          "city": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Postal town or city."
          },
          "employees": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "number"
              }
            ],
            "description": "Employee count reported by the source."
          },
          "founded_date": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Company founding date from the register."
          },
          "latest_revenue": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "fiscal_year": {
                    "type": "number",
                    "description": "Fiscal year to which these financial figures apply."
                  },
                  "revenue": {
                    "anyOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "number"
                      }
                    ],
                    "description": "Revenue in the source financial report's units."
                  }
                },
                "required": [
                  "fiscal_year",
                  "revenue"
                ],
                "additionalProperties": false
              }
            ],
            "description": "Revenue from the latest available financial report."
          },
          "domains": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Web domains associated with the company."
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional email addresses."
          },
          "daglig_leder": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ],
            "description": "Managing director reported by the Norwegian register."
          },
          "score": {
            "type": "number",
            "description": "Score assigned to this result. Use the operation's scale and constraints when interpreting it."
          },
          "channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "keyword",
                "semantic"
              ]
            },
            "description": "Channels contributing to this result or selected for this operation."
          },
          "snippet": {
            "type": "string",
            "description": "A short excerpt showing why the result matched."
          }
        },
        "required": [
          "org_number",
          "name",
          "org_form",
          "nace",
          "industry_label",
          "kommune",
          "city",
          "employees",
          "founded_date",
          "latest_revenue",
          "domains",
          "emails",
          "daglig_leder",
          "score",
          "channels",
          "snippet"
        ],
        "additionalProperties": false
      },
      "description": "Matching company records, in the returned search order."
    }
  },
  "required": [
    "hits"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "hits": [
        {
          "org_number": "999999999",
          "name": "Northstar Consulting AS",
          "org_form": "AS",
          "nace": [
            "62.020"
          ],
          "industry_label": "IT consulting",
          "kommune": "0301",
          "city": null,
          "employees": null,
          "founded_date": null,
          "latest_revenue": null,
          "domains": [],
          "emails": [],
          "daglig_leder": "Alex Morgan",
          "score": 1,
          "channels": [],
          "snippet": "IT consulting and onboarding services."
        }
      ]
    }
  ]
}
```

