> ## 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.

# Use cases

### Growth snapshot

Fetch the current headcount and growth rate across standard lookback windows for a company.

<CodeGroup>
  ```bash cURL theme={null}
  curl -G "https://api.akta.pro/api/v1/company/headcount-trends/" \
    --data-urlencode "company=https://canva.com" \
    -H "x-api-key: your api key"
  ```

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

  url = "https://api.akta.pro/api/v1/company/headcount-trends"

  payload = {}
  headers = {
    'x-api-key': 'your api key'
  }
  params = {"company": "https://canva.com"}

  response = requests.request("GET", url, headers=headers, params=params, data=payload)

  print(response.text)
  ```
</CodeGroup>

**Sample response:**

```json expandable theme={null}
{
  "data": {
    "uuid": "00000jw-canva",
    "linkedin_username": "2850862",
    "linkedin_official_name": "Canva",
    "linkedin_id": "2850862",
    "total_employees": 17694,
    "growth_periods": [
      { "month_difference": 6, "change_percentage": 29 },
      { "month_difference": 12, "change_percentage": 73 },
      { "month_difference": 24, "change_percentage": 111 }
    ],
    "headcount_growth": [
      { "employee_count": 17575, "date": "2026-06-01" },
      { "employee_count": 17694, "date": "2026-07-01" }
    ],
    "date": "2026-07-01",
    "headcount_by_function": [
      {
        "name": "Arts and Design",
        "employee_count": 5113,
        "growth_periods": [
          { "month_difference": 6, "change_percentage": 42 },
          { "month_difference": 12, "change_percentage": 78 }
        ]
      }
    ]
  },
  "credits_consumed": 2.5
}
```

### Historical trend charting

Extract the `headcount_growth` series to chart hiring trajectory over time, or flag inflection points such as sudden slowdowns or accelerations.

```python theme={null}
import requests

HEADERS = {"x-api-key": "<YOUR_API_KEY>"}

response = requests.get(
    "https://api.akta.pro/api/v1/company/headcount-trends",
    headers=HEADERS,
    params={"company": "canva.com"}
)

series = response.json()["data"]["headcount_growth"]

# Series is already chronological, but sort defensively
series = sorted(series, key=lambda p: p["date"])

print(f"{'Month':<12} {'Headcount':<12} {'MoM Change'}")
print("-" * 40)
prev = None
for point in series:
    count, date = point["employee_count"], point["date"]
    if prev is not None:
        change = (count - prev) / prev * 100
        change_str = f"{change:+.1f}%"
    else:
        change_str = "—"
    print(f"{date:<12} {count:<12,} {change_str}")
    prev = count
```

### Function-level breakdown

Identify which teams are driving overall headcount growth which could be useful for spotting a shift toward sales-led expansion, an engineering build-out, or disproportionate hiring in a single function.

```python theme={null}
import requests

HEADERS = {"x-api-key": "<YOUR_API_KEY>"}

response = requests.get(
    "https://api.akta.pro/api/v1/company/headcount-trends",
    headers=HEADERS,
    params={"company": "canva.com"}
)

functions = response.json()["data"]["headcount_by_function"]

# Rank functions by 12-month growth rate
def growth_12mo(fn):
    return next(
        (g["change_percentage"] for g in fn["growth_periods"] if g["month_difference"] == 12),
        0
    )

ranked = sorted(functions, key=growth_12mo, reverse=True)

print(f"{'Function':<28} {'Headcount':<12} {'12mo Growth'}")
print("-" * 55)
for fn in ranked:
    print(f"{fn['name']:<28} {fn['employee_count']:<12,} {growth_12mo(fn)}%")
```

### Competitive benchmark across multiple companies

Fetch headcount and growth for a set of companies and compare hiring velocity side by side. This could be useful for tracking relative momentum within a competitive set.

```python theme={null}
import requests

HEADERS   = {"x-api-key": "<YOUR_API_KEY>"}
COMPANIES = ["canva.com", "figma.com", "notion.so", "miro.com"]

def get_growth(fn_list, months):
    return next(
        (g["change_percentage"] for g in fn_list if g["month_difference"] == months),
        None
    )

def get_headcount(company):
    r = requests.get(
        "https://api.akta.pro/api/v1/company/headcount-trends",
        headers=HEADERS,
        params={"company": company}
    )
    data = r.json()["data"]
    return {
        "company":  company,
        "total":    data["total_employees"],
        "growth_6mo":  get_growth(data["growth_periods"], 6),
        "growth_12mo": get_growth(data["growth_periods"], 12)
    }

results = [get_headcount(c) for c in COMPANIES]
results.sort(key=lambda x: x["growth_12mo"] or 0, reverse=True)

print(f"{'Company':<15} {'Employees':<12} {'6mo Growth':<12} {'12mo Growth'}")
print("-" * 55)
for r in results:
    print(f"{r['company']:<15} {r['total']:<12,} {r['growth_6mo']}%{'':<8} {r['growth_12mo']}%")
```
