> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akta.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Company Search

## Overview

The Company Search API resolves a company name, website domain, or UUID into a structured company record. Its primary purpose is to look up the `uuid` needed by the other APIs when you only have a company name to start with.

This is a **free endpoint** so it does not consume API credits.

**Endpoint**

```text theme={null}
GET https://api.akta.pro/api/v1/company/search
```

Pass a single `query` query parameter. The backend automatically detects whether the input is a company name, website domain or UUID and resolves it accordingly.

***

## Authentication

All requests must include an **API key** in the `x-api-key` HTTP header.

```text theme={null}
x-api-key: <YOUR_API_KEY>
```

<Warning>
  Never expose your API key in client-side code, browser requests, or public repositories. A missing or invalid key returns `401 Unauthorized`.
</Warning>

***

## Request Reference

| Parameter | Type   | Required     | Description                                                                                                                                                            |
| --------- | ------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`   | string | **Required** | Company name (e.g. `"Canva"`), website domain (e.g. `"canva.com"`), or UUID (e.g. `"00000jw-canva"`). The API automatically identifies the input type and resolves it. |

**Example requests:**

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://api.akta.pro/api/v1/company/search?query=Canva' \
    --header 'x-api-key: <YOUR_API_KEY>'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.akta.pro/api/v1/company/search",
      headers={"x-api-key": "<YOUR_API_KEY>"},
      params={"query": "Canva"}
  )

  results = response.json()["data"]
  if results:
      company = results[0]
      print(f"UUID:    {company['uuid']}")
      print(f"Name:    {company['name']}")
      print(f"Website: {company['website']}")
      print(f"Status:  {company['company_status']}")
  ```
</CodeGroup>

***

## Response

### Response envelope

```json theme={null}
{
  "data": [
    {
      "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "Canva",
      "website": "https://canva.com",
      "product_category": "SaaS",
      "company_status": "private"
    }
  ],
  "credits_consumed": 0.00
}
```

| Field              | Type      | Description                                                                    |
| ------------------ | --------- | ------------------------------------------------------------------------------ |
| `data`             | object\[] | Array of matching company objects. Empty array `[]` when no results are found. |
| `credits_consumed` | float     | Always `0.00` — this is a free endpoint.                                       |

### Company object

| Field              | Type          | Description                                                                                                   |
| ------------------ | ------------- | ------------------------------------------------------------------------------------------------------------- |
| `uuid`             | string (UUID) | Unique Akta identifier for the company. Pass this as the `company` parameter in the Enrichment and News APIs. |
| `name`             | string        | Legal or registered company name.                                                                             |
| `website`          | string        | Primary website URL, normalised with no trailing slash.                                                       |
| `product_category` | string        | Primary product or service category (e.g. `"SaaS"`, `"FinTech"`, `"Healthcare"`).                             |
| `company_status`   | string        | Public market status: `"public"`, `"private"`, `"acquired"`, `"delisted"`, or `"unknown"`.                    |

When no companies match the query, the API returns `204 No Content` with an empty `data` array.

***

## Using the UUID in other APIs

Once you have the `uuid`, pass it as the `company` field in downstream API calls:

```python theme={null}
import requests

HEADERS = {"x-api-key": "your-api-key"}

# Step 1: Search for the company
search = requests.get(
    "https://api.akta.pro/api/v1/company/search",
    headers=HEADERS,
    params={"query": "Canva"}
)
uuid = search.json()["data"][0]["uuid"]

# Step 2: Use the UUID in Company Data API
enrich = requests.get(
    "https://api.akta.pro/api/v1/company/enrichment/",   # was POST /v1/company/enrichment
    headers=HEADERS,
    params={"company": uuid, "sections": "firmographic,business_model"}
)
enrich.raise_for_status()   
enrich_data = enrich.json()
print(enrich_data["data"]["firmographic"]["name"])

# Or use it in the News API
news = requests.get(
    "https://api.akta.pro/api/v1/news/",
    headers=HEADERS,
    params={"company": uuid, "limit": 10}
)
news.raise_for_status()
news_data = news.json()
article_count = news_data.get("count", news_data.get("total", "unknown"))
print(f"Found {article_count} articles")
```
