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

# Social Posts API Use cases

> Use cases walkthrough - Content mix by classification and format, engagement performance, and posting cadence.

### Recent posts snapshot

Fetch a company's most recent social posts with their content type and top-line engagement.

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

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

  url = "https://api.akta.pro/api/v1/company/posts"

  headers = {"x-api-key": "your api key"}
  params = {"company": "https://canva.com", "limit": 10}

  response = requests.get(url, headers=headers, params=params)
  print(response.text)
  ```
</CodeGroup>

**Sample response:**

```json expandable theme={null}
{
  "count": 396,
  "limit": 10,
  "offset": 0,
  "data": {
    "uuid": "00000l1",
    "posts": [
      {
        "id": "WXN2OJ3HV7",
        "content_type": "document",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7493984848869715968/",
        "posted_date": "2026-08-14 11:00:19.476000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 270,
          "like_count": 226,
          "empathy_count": 36,
          "praise_count": 3,
          "appreciation_count": 0,
          "interest_count": 3,
          "funny_count": 0,
          "comments_count": 0,
          "reposts_count": 12
        },
        "text_content": "Fonts for when the vibes are grain, filters, and a candid moment. Save these for your next design!  \n\nNow fill in the blank: Fonts that give _______. We might do yours next. 😉",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXC9MJ3SU4",
        "content_type": "document",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7493622474518048768/",
        "posted_date": "2026-08-13 11:00:22.698000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 131,
          "like_count": 113,
          "empathy_count": 13,
          "praise_count": 2,
          "appreciation_count": 0,
          "interest_count": 0,
          "funny_count": 3,
          "comments_count": 0,
          "reposts_count": 5
        },
        "text_content": "#WhatsNew? Add images and videos to comments! 🤩 \nMake your feedback even clearer with a reference, recommendation, or good old reaction pic. \n\nWhat photo are you using to get approvals faster? Drop it in the comments!",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXG2S52QAP",
        "content_type": "document",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7493260080226906112/",
        "posted_date": "2026-08-12 11:00:21.166000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 349,
          "like_count": 267,
          "empathy_count": 42,
          "praise_count": 6,
          "appreciation_count": 0,
          "interest_count": 2,
          "funny_count": 28,
          "comments_count": 0,
          "reposts_count": 9
        },
        "text_content": "Kinda chic to design with Canva 😉 What’s your version of this?",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WX1QA3MQFA",
        "content_type": "linkedInVideo",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7492897649436639232/",
        "posted_date": "2026-08-11 11:00:10.932000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 217,
          "like_count": 180,
          "empathy_count": 24,
          "praise_count": 5,
          "appreciation_count": 0,
          "interest_count": 1,
          "funny_count": 3,
          "comments_count": 0,
          "reposts_count": 9
        },
        "text_content": "In a world full of busy nine-to-fives, what do you make time for? 🤔💬",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WX7AD2EHNC",
        "content_type": "linkedInVideo",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7492535330345111552/",
        "posted_date": "2026-08-10 11:00:27.329000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 231,
          "like_count": 201,
          "empathy_count": 25,
          "praise_count": 3,
          "appreciation_count": 0,
          "interest_count": 2,
          "funny_count": 0,
          "comments_count": 0,
          "reposts_count": 7
        },
        "text_content": "Looking for design inspiration? Here’s a creative idea for the videos already in your camera roll. 🤳🏻",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXPWIE1OJA",
        "content_type": "document",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7491448177095770112/",
        "posted_date": "2026-08-07 11:00:29.796000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 221,
          "like_count": 168,
          "empathy_count": 18,
          "praise_count": 2,
          "appreciation_count": 0,
          "interest_count": 1,
          "funny_count": 32,
          "comments_count": 0,
          "reposts_count": 12
        },
        "text_content": "We heard you found chronically online mode. 🤪🤳🏻 And the search results are... interesting. This you, bestie?\n\nLock in and turn it on:\n1️⃣ Open Canva\n2️⃣ Your Account > Language > English (chronically online)\n3️⃣ Search “pizza”, “contact”, and “phone” – for research purposes.\n\nHave fun!",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXEXNIG0X9",
        "content_type": "linkedInVideo",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7491266929437986816/",
        "posted_date": "2026-08-06 23:00:16.987000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 68,
          "like_count": 68,
          "empathy_count": 0,
          "praise_count": 0,
          "appreciation_count": 0,
          "interest_count": 0,
          "funny_count": 0,
          "comments_count": 0,
          "reposts_count": 3
        },
        "text_content": "What's one goal you'd like to see achieved in your lifetime? 👇\n\nTurns out, when you ask people this question, they almost always have an answer. But what's been missing is somewhere to put these hopes, and a way to see how many other people are holding onto that same vision.\n\nThis is the ambition of our USA Goals initiative. In partnership with the Ad Council, we’re inviting Americans everywhere to share the goals they want to see realized. \n\nLearn more here: https://lnkd.in/ecARjEuT\n\n #USAGoals",
        "post_classification": "People & culture",
        "author": {},
        "mentions": [
          {
            "name": "Ad Council",
            "linkedin_url": "https://www.linkedin.com/company/the-advertising-council/",
            "mention_type": "company",
            "linkedin_public_identifier": "the-advertising-council"
          }
        ]
      },
      {
        "id": "WX8HOIKXXW",
        "content_type": "image",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7491085724746858497/",
        "posted_date": "2026-08-06 11:00:14.422000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 79,
          "like_count": 65,
          "empathy_count": 9,
          "praise_count": 2,
          "appreciation_count": 0,
          "interest_count": 0,
          "funny_count": 3,
          "comments_count": 0,
          "reposts_count": 3
        },
        "text_content": "It’s either snoozing 5x or waking up right before the alarm goes off – there’s no in between. \n\nAre you a morning person or a night owl? ⛅️🦉Drop your routines: https://lnkd.in/eCWuknVR",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXDVVT2FF1",
        "content_type": "document",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7490723342371663872/",
        "posted_date": "2026-08-05 11:00:15.731000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 25,
          "like_count": 22,
          "empathy_count": 0,
          "praise_count": 0,
          "appreciation_count": 0,
          "interest_count": 0,
          "funny_count": 2,
          "comments_count": 0,
          "reposts_count": 2
        },
        "text_content": "👀 We trust the Canva stans. Comment your vote! 👇",
        "post_classification": "Other",
        "author": {},
        "mentions": []
      },
      {
        "id": "WXQZM42QAE",
        "content_type": "linkedInVideo",
        "url": "https://www.linkedin.com/feed/update/urn:li:activity:7490360996130279424/",
        "posted_date": "2026-08-04 11:00:25.655000+00:00",
        "is_paid": false,
        "reposted": false,
        "engagement_metrics": {
          "total_reaction_count": 186,
          "like_count": 160,
          "empathy_count": 16,
          "praise_count": 6,
          "appreciation_count": 0,
          "interest_count": 3,
          "funny_count": 0,
          "comments_count": 0,
          "reposts_count": 18
        },
        "text_content": "Canva Code just leveled up! Use the same prompt, get a way better output. Here’s what you can build now 👉 https://lnkd.in/ecqfxfkD",
        "post_classification": "Product & technology",
        "author": {},
        "mentions": []
      }
    ]
  },
  "credits_consumed": 1
}
```

### Content mix by classification and format

Break down what a company posts about (`post_classification`) and in what format (`content_type`) to profile its content strategy.

```python theme={null}
import requests
from collections import Counter

HEADERS = {"x-api-key": "your_api_key"}
BASE_URL = "https://api.akta.pro/api/v1/company/posts"
PAGE_SIZE = 30

def fetch_all_posts(company):
    all_posts = []
    offset = 0

    while True:
        resp = requests.get(
            BASE_URL,
            headers=HEADERS,
            params={"company": company, "limit": PAGE_SIZE, "offset": offset}
        )
        resp.raise_for_status()
        payload = resp.json()

        posts = payload["data"]["posts"]
        all_posts.extend(posts)

        total = payload["count"]
        offset += len(posts)

        if offset >= total or not posts:
            break

    return all_posts

posts = fetch_all_posts("canva.com")

by_theme  = Counter(p["post_classification"] for p in posts)
by_format = Counter(p["content_type"] for p in posts)

print(f"Total posts analyzed: {len(posts)}\n")

print("Content by theme:")
for theme, n in by_theme.most_common():
    print(f"  {theme:<24} {n}")

print("\nContent by format:")
for fmt, n in by_format.most_common():
    print(f"  {fmt:<18} {n}")
```

### Engagement performance analysis

Rank posts by engagement to find what resonates, and compare average engagement across themes or formats.

```python theme={null}
import requests
from collections import defaultdict

HEADERS = {"x-api-key": "your_api_key"}
BASE_URL = "https://api.akta.pro/api/v1/company/posts"
PAGE_SIZE = 30

def fetch_all_posts(company):
    all_posts = []
    offset = 0

    while True:
        resp = requests.get(
            BASE_URL,
            headers=HEADERS,
            params={"company": company, "limit": PAGE_SIZE, "offset": offset}
        )
        resp.raise_for_status()
        payload = resp.json()

        posts = payload["data"]["posts"]
        all_posts.extend(posts)

        total = payload["count"]
        offset += len(posts)

        if offset >= total or not posts:
            break

    return all_posts

def total_engagement(p):
    m = p["engagement_metrics"]
    return m["total_reaction_count"] + m["comments_count"] + m["reposts_count"]

posts = fetch_all_posts("canva.com")
print(f"Total posts analyzed: {len(posts)}\n")

# Top posts overall
print("Top posts by engagement:")
for p in sorted(posts, key=total_engagement, reverse=True)[:5]:
    print(f"  {total_engagement(p):>6}  [{p['content_type']}]  {p['text_content'][:50]}")

# Average engagement per theme
sums, counts = defaultdict(int), defaultdict(int)
for p in posts:
    sums[p["post_classification"]] += total_engagement(p)
    counts[p["post_classification"]] += 1

print("\nAverage engagement by theme:")
for theme in sorted(sums, key=lambda t: sums[t]/counts[t], reverse=True):
    print(f"  {theme:<24} {sums[theme]/counts[theme]:,.0f}")
```

### Reaction sentiment mix

Beyond raw reaction counts, the breakdown by reaction type hints at *how* an audience responds — celebratory (`praise`), supportive (`empathy`), amused (`funny`), or simply approving (`like`).

```python theme={null}
import requests

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

resp = requests.get(
    "https://api.akta.pro/api/v1/company/posts",
    headers=HEADERS,
    params={"company": "canva.com", "limit": 50}
).json()

for p in resp["data"]["posts"][:5]:
    m = p["engagement_metrics"]
    total = m["total_reaction_count"] or 1
    funny_share = m["funny_count"] / total * 100
    print(f"{p['text_content'][:45]:<48} funny: {funny_share:4.1f}%  total: {m['total_reaction_count']}")
```

### Posting cadence over time

Use `posted_date` to measure how frequently a company posts — a proxy for marketing activity and consistency.

```python theme={null}
import requests
from collections import Counter

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

resp = requests.get(
    "https://api.akta.pro/api/v1/company/posts",
    headers=HEADERS,
    params={"company": "canva.com", "limit": 30}
).json()

posts = resp["data"]["posts"]

# Posts per month (YYYY-MM from the ISO date)
by_month = Counter(p["posted_date"][:7] for p in posts)

print(f"{'Month':<10} {'Posts'}")
print("-" * 18)
for month in sorted(by_month):
    print(f"{month:<10} {by_month[month]}")
```
