---
title: "Similar companies (province + CNAE2 + BORME activity)"
method: GET
path: "/api/v1/company/{slug}/similar"
tags: ["Companies"]
---

# Similar companies (province + CNAE2 + BORME activity)

`GET /api/v1/company/{slug}/similar`

## Request

- Base URL: `https://openmercantil.es`
- URL: `https://openmercantil.es/api/v1/company/{slug}/similar`
- Auth: one of:
  - none
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/openmercantil/apis/openmercantil-public-api/docs/api/v1/company/:slug/similar/get.ts> (a function with typed inputs; its response is checked against the schema)

Return admitted companies in the same province and published two-digit CNAE division, ranked by proximity of BORME act count. This documentary heuristic is neither a relationship nor a recommendation; every result is independently admitted by company_public_v2.

## Path parameters

- `slug` string, required

## Query parameters

- `limit` integer

## Response `200`

Similar companies list

- CompanySimilarResponse
  - `slug` string, required
  - `count` integer, required
  - `items` CompanySearchItem[], required
    - `slug` string, required
    - `name` string, required
    - `cif` string, required
    - `acts_count` integer, required
    - `last_seen` string, nullable
    - `province` string, nullable
    - `cnae_code` string, nullable
    - `cnae_section` string, nullable
    - `capital_cents` integer, nullable
    - `first_seen` string, nullable
    - `matched_alias` string: Present only when an exact safe alias was matched; slug is always canonical.
    - `aliases` string[]

## Other responses

- `400`: Invalid request
- `404`: Resource not found
- `422`: The query is lexically valid but outside a documented numeric or length bound, or uses an unsupported indexed combination.
- `429`: Rate limit exceeded
- `503`: Controlled fail-closed denial: the required dataset or legal layer is absent, invalid, unsupported or not authorized for this public surface.

## Changes

- **2026-07-26** `996f96a11758`: 12 info
  - api operation id `getCompanyBySlugSimilar` was added
  - the endpoint scheme security `apiKey` was added to the API
  - the endpoint scheme security `bearerAuth` was added to the API
  - added the new optional `query` request parameter `limit`
  - …8 more

[Operation history](https://skmtc.dev/openmercantil/apis/openmercantil-public-api/changes/api/v1/company/:slug/similar/get.md)

---

[API](https://skmtc.dev/openmercantil/apis/openmercantil-public-api.md) - [All operations](https://skmtc.dev/openmercantil/apis/openmercantil-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openmercantil/apis/openmercantil-public-api/revisions/601ff6123c86?raw)
