---
title: Validate Brazilian CNPJ Number API
slug: check-cnpj
url: https://apyhub.com/dam4g/service/check-cnpj
provider: DAM4G APIs
categories: [Data Validation]
tags: [cnpj, brazil, company-registration, document-validation, identity-check]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Validate Brazilian CNPJ Number API

Validate Brazilian CNPJ numbers and get the original value, document type, validity flag, and formatted value for clean downstream handling.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| GET | `https://api.eu.apyhub.com/dam4g/check-cnpj/cnpj/:number` | What it does Checks whether a supplied CNPJ number is valid and returns a validation result object.… | 10 |

## Endpoint reference

### Validate CNPJ

`GET https://api.eu.apyhub.com/dam4g/check-cnpj/cnpj/:number` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `number` | path | string | yes | Number |

#### Quickstart

Check a CNPJ by sending the required `number` path value in the URL.

```bash
curl -X GET "https://api.eu.apyhub.com/dam4g/check-cnpj/cnpj/:number" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with `document_type`, `input_value`, and `is_valid` fields, plus an optional `formatted_value` field. `document_type` and `input_value` are strings, `is_valid` is a boolean, and `formatted_value` is either a string or `null`.

```json
{
  "document_type": "cnpj",
  "input_value": "11222333000181",
  "formatted_value": "11.222.333/0001-81",
  "is_valid": true
}
```

## About

## What it does
CNPJ Validator checks whether a Brazilian company registration number is valid. Send a `number` string, and get back a validation result with `is_valid`, `input_value`, `document_type`, and optional `formatted_value`.

Use it when you need to verify business IDs before creating customer records, processing onboarding data, or cleaning up imported spreadsheets. It gives you a simple pass/fail result without requiring you to implement CNPJ checksum logic in your own application.

The response is built for straightforward automation: `input_value` reflects what you sent, `document_type` identifies the document being checked, and `formatted_value` may return a normalized version when available. That makes it useful for form validation, account setup flows, and back-office data quality checks where you want to reject malformed CNPJ values early.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dam4g/service/check-cnpj
