# NewFirmRadar API

JSON REST API for newly registered companies, by country (`vn`, `uk`). Pull the new-company feed, keep a copy in sync with the change feed, and reveal public business contacts with credits.

- Base URL: https://nfr.vibevn.app
- OpenAPI 3.1: https://nfr.vibevn.app/api/v1/openapi.json
- MCP server (for AI assistants): https://nfr.vibevn.app/api/mcp

## Authentication

Create a key at https://nfr.vibevn.app/app/api-keys (shown once). Send it from your server as `Authorization: Bearer nfr_live_…`.

## Limits

| Plan | Requests/day | Requests/second |
|---|---|---|
| Free | 10 | 2 |
| Pro | 5,000 | 5 |
| Business | 50,000 | 20 |

Responses carry `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`. Over the limit: `429` with `Retry-After`. Reads are free; only reveals spend credits.

## List new companies

`GET /api/v1/{cc}/companies`

Newest incorporations first. Paginate with `next_cursor` until it is `null`. Companies without an incorporation date are not included.

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |
| `q` | query | no | Name contains (accent-insensitive, ≥ 2 chars). |
| `industry` | query | no | Industry code or slug (see /reference). |
| `region` | query | no | Region code or slug (see /reference). |
| `status` | query | no | active, inactive, suspended, dissolving, dissolved, unknown. |
| `legal_form` | query | no | Legal form code (see /reference). |
| `founded_from` | query | no | Incorporated on/after (YYYY-MM-DD). |
| `founded_to` | query | no | Incorporated on/before (YYYY-MM-DD). |
| `limit` | query | no | 1–100, default 50. |
| `cursor` | query | no | Opaque `next_cursor` from the previous page. |

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/vn/companies?industry=6201&founded_from=2026-11-01&limit=50" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "country": "vn",
  "data": [{
    "registry_id": "0109876543",
    "name": "CÔNG TY TNHH GIẢI PHÁP ABC",
    "name_en": "ABC SOLUTIONS CO., LTD",
    "legal_form": { "code": "tnhh_1tv", "name": "Công ty TNHH một thành viên" },
    "status": "active",
    "founded_date": "2026-11-21",
    "capital": { "amount": 2000000000, "currency": "VND" },
    "industry": { "code": "6201", "slug": "lap-trinh-may-vi-tinh", "name": "Lập trình máy vi tính" },
    "industry_codes": ["6201", "6202"],
    "region": { "code": "01", "slug": "ha-noi", "name": "Thành phố Hà Nội" },
    "address": "Số 1 Phố X, Phường Y, Hà Nội",
    "website": null,
    "representative": "NGUYỄN VĂN A",
    "url": "https://newfirmradar.com/vn/company/0109876543-cong-ty-tnhh-giai-phap-abc",
    "updated_at": "2026-11-22T01:02:03.456+00:00"
  }],
  "next_cursor": "WyIyMDI2LTExLTIxIiwiMTIzNDUiXQ"
}
```

## Get one company

`GET /api/v1/{cc}/companies/{registry_id}`

Full record plus contacts in **masked** form with their reveal cost. Returns `410 GONE` if the company opted out — delete it from your copy.

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |
| `registry_id` | path | yes | Official company number (VN: mã số doanh nghiệp, UK: Companies House number). |

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/vn/companies/0109876543" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "data": {
    "registry_id": "0109876543",
    "name": "CÔNG TY TNHH GIẢI PHÁP ABC",
    "…": "same fields as the list",
    "contacts": [
      { "id": "88231", "kind": "phone", "label": "Hotline", "masked": "+84 24 •••• •••", "reveal_cost": 1,
        "source_url": "https://abc.vn/lien-he", "collected_at": "2026-11-20" }
    ]
  }
}
```

## Reveal a contact

`POST /api/v1/{cc}/companies/{registry_id}/reveal`

Returns the real value of a public business contact. Charges credits once; revealing the same contact again within 12 months is free. Subject to your plan's daily reveal limit.

**Cost:** 1 credit per contact (free to re-reveal within 12 months).

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |
| `registry_id` | path | yes | Official company number (VN: mã số doanh nghiệp, UK: Companies House number). |

Body: `contact_id` from the company's `contacts`.

```json
{ "contact_id": "88231" }
```

Request:

```bash
curl -X POST "https://nfr.vibevn.app/api/v1/vn/companies/0109876543/reveal" \
  -H "Authorization: Bearer $NFR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "contact_id": "88231" }'
```

Response:

```json
{
  "data": { "contact_id": "88231", "kind": "phone", "value": "+84 24 3999 8888", "label": "Hotline",
            "source_url": "https://abc.vn/lien-he", "collected_at": "2026-11-20" },
  "charged": 1,
  "balance": 299
}
```

## Change feed

`GET /api/v1/{cc}/changes`

Every create / update / status change, oldest first — use it to keep a local copy in sync. Store the last `next_cursor` and continue from it.

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |
| `since` | query | yes | ISO 8601 timestamp (required unless `cursor` is given). |
| `limit` | query | no | 1–500, default 100. |
| `cursor` | query | no | Opaque `next_cursor` from the previous page. |

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/vn/changes?since=2026-11-22T00%3A00%3A00Z" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "country": "vn",
  "data": [
    { "id": "551", "changed_at": "2026-11-22T03:00:00.12+00:00", "registry_id": "0109876543", "type": "created", "field": null, "old_value": null, "new_value": null },
    { "id": "552", "changed_at": "2026-11-22T04:10:00.55+00:00", "registry_id": "0101112223", "type": "status_changed", "field": "status", "old_value": "active", "new_value": "dissolving" }
  ],
  "next_cursor": null
}
```

## Removed records

`GET /api/v1/{cc}/suppressions`

Companies or values removed after an opt-out. **You must delete these from your copy** (API terms). Poll at least daily.

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |
| `since` | query | no | ISO 8601 timestamp; default = all. |
| `limit` | query | no | 1–1000, default 500. |
| `cursor` | query | no | Opaque `next_cursor` from the previous page. |

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/vn/suppressions" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "country": "vn",
  "data": [{ "registry_id": "0101234567", "scope": "company", "field": null, "suppressed_at": "2026-11-20T08:00:00+00:00" }],
  "next_cursor": null
}
```

## Codes for filters

`GET /api/v1/{cc}/reference`

Industries, regions, legal forms and statuses used by the filters.

| Parameter | In | Required | Description |
|---|---|---|---|
| `cc` | path | yes | Country code: `vn` or `uk`. |

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/vn/reference" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "country": "vn",
  "legal_forms": [{ "code": "tnhh_1tv", "name": "Công ty TNHH một thành viên" }],
  "statuses": ["active", "inactive", "…"],
  "industries": [{ "code": "6201", "slug": "lap-trinh-may-vi-tinh", "name": "Lập trình máy vi tính" }],
  "regions": [{ "code": "01", "slug": "ha-noi", "name": "Thành phố Hà Nội" }]
}
```

## Account & quota

`GET /api/v1/me`

Your plan, credit balance and today's API usage. Counts toward quota like any other call.

Request:

```bash
curl "https://nfr.vibevn.app/api/v1/me" \
  -H "Authorization: Bearer $NFR_API_KEY"
```

Response:

```json
{
  "data": { "email": "you@example.com", "plan": "pro_monthly", "plan_ends_at": "2026-12-22 10:00:00+00",
            "credits": 299, "quota": { "daily": 5000, "used_today": 42, "per_second": 5, "resets": "00:00 UTC" }, "key_id": "3" }
}
```

## Errors

| Status | Code | Meaning |
|---|---|---|
| 400 | `BAD_PARAM / BAD_CURSOR / BAD_REQUEST` | Invalid parameter, cursor or body. |
| 401 | `UNAUTHENTICATED / INVALID_KEY` | Missing, malformed or revoked key. |
| 402 | `INSUFFICIENT_CREDITS` | Not enough credits to reveal. |
| 403 | `ACCOUNT_LOCKED / TERMS_REACCEPT_REQUIRED / EMAIL_NOT_VERIFIED / NOT_ALLOWED` | Account or field not allowed. |
| 404 | `NOT_FOUND / UNKNOWN_COUNTRY` | No such company, contact or country. |
| 410 | `GONE` | Company removed after opt-out — delete it. |
| 429 | `RATE_LIMITED / QUOTA_EXCEEDED / DAILY_LIMIT` | Per-second limit, daily quota or daily reveal limit. See Retry-After. |

Error body: `{ "error": { "code": "…", "message": "…" }, "request_id": "req_…" }`

## MCP (Model Context Protocol)

Endpoint: `https://nfr.vibevn.app/api/mcp` (Streamable HTTP, stateless). Authenticate with the same API key: header `Authorization: Bearer nfr_live_…`. Calls count toward the same quota.

Tools:

- `search_new_companies` — List newly registered companies with filters (name, industry, region, status, legal form, date range).
- `get_company` — Full public record of one company, contacts masked.
- `reveal_contact` — Reveal one business contact — costs 1 credit.
- `list_changes` — Record changes since a timestamp (incremental sync).
- `list_suppressions` — Companies/contacts removed on request — delete your copies.
- `get_reference` — Industry, region and legal-form codes for a country.
- `account_info` — Your plan, credits and API quota.

Claude Code:

```bash
claude mcp add --transport http newfirmradar https://nfr.vibevn.app/api/mcp \
  --header "Authorization: Bearer nfr_live_YOUR_KEY"
```

## Usage rules

API data is subject to the Terms (https://nfr.vibevn.app/terms) and Acceptable Use Policy (https://nfr.vibevn.app/acceptable-use): no spam, no resale of raw data, and records listed by /suppressions must be deleted.
