> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.data.aviato.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.data.aviato.co/_mcp/server.

# Enrich Legal

GET https://data.api.aviato.co/company/legal

Get a company's legal identifiers and registered name. Returns 404 without charging when no category data is available.

Reference: https://docs.data.aviato.co/api-reference/company/enrich-legal

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `id` (string, optional)
- `linkedinID` (string, optional)
- `linkedinNumID` (string, optional)
- `linkedinURL` (string, optional) — LinkedIn URL, accepts company URLs like linkedin.com/company/google or linkedin.com/company/1441
- `facebookID` (string, optional)
- `twitterID` (string, optional)
- `crunchbaseID` (string, optional)
- `pitchbookID` (string, optional)
- `producthuntID` (string, optional)
- `dealroomID` (string, optional)
- `goldenID` (string, optional)
- `angellistID` (string, optional)
- `wellfoundID` (string, optional)
- `website` (string, optional)
- `require` (list of string, optional) — Each requested top-level response field must be non-empty; otherwise returns 404 without charging.

## Response

### 200

- `cageCode` (string, optional) — The Cage Code of the company.
- `dunsNumber` (string, optional) — The DUNS Number of the company.
- `NAICSCode` (string, optional) — The NAICS Code of the company.
- `CIKNumber` (string, optional) — The CIK Number of the company.
- `wikidataID` (string, optional) — The Wikidata ID of the company.
- `wellfoundID` (string, optional) — The Wellfound ID of the company.
- `huggingFaceID` (string, optional) — The Hugging Face ID of the company
- `glassdoorID` (string, optional) — The Glassdoor ID of the company
- `legalEntityID` (string, optional) — The legal entity ID of the company
- `legalName` (string, optional) — The legal name of the company

## Errors

### 404 Company Not Found Error

### 401 Unauthorized Error

### 429 Rate Limit Error

### 400 Bad Request Error

- `message` (string, required)

## Examples

**Response**

```json
{
  "cageCode": "cageCode",
  "dunsNumber": "dunsNumber",
  "NAICSCode": "NAICSCode",
  "CIKNumber": "CIKNumber",
  "wikidataID": "wikidataID",
  "wellfoundID": "wellfoundID",
  "huggingFaceID": "huggingFaceID",
  "glassdoorID": "glassdoorID",
  "legalEntityID": "legalEntityID",
  "legalName": "legalName"
}
```

**SDK Code**

```python
import requests

url = "https://data.api.aviato.co/company/legal"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://data.api.aviato.co/company/legal';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://data.api.aviato.co/company/legal"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://data.api.aviato.co/company/legal")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://data.api.aviato.co/company/legal")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://data.api.aviato.co/company/legal', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://data.api.aviato.co/company/legal");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://data.api.aviato.co/company/legal")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```