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

# API Use Cases & Workflows

> Common API workflows for sales signal detection, competitor monitoring, hiring alerts, trending content discovery, and AI agent integration with LinkedIn.

## Sales Signal Detection

Monitor LinkedIn for buying intent signals - people talking about problems your product solves, comparing tools, or looking for recommendations.

```bash theme={null}
# 1. Create a keyword watchlist for buying signals
curl -X POST "https://api.outx.ai/api-keyword-watchlist" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "name": "Buying Intent - CRM Tools",
    "keywords": [
      "looking for a CRM",
      "CRM recommendation",
      {
        "keyword": "switching from",
        "required_keywords": ["CRM", "sales tool"],
        "excluded_keywords": ["hiring", "job"]
      }
    ],
    "fetchFreqInHours": 6
  }'

# 2. Retrieve high-intent posts sorted by relevance
curl -X GET "https://api.outx.ai/api-posts?watchlist_id=YOUR_ID&sort_by=relevance_first" \
  -H "x-api-key: YOUR_API_KEY"
```

**What you get:** A continuously updated feed of LinkedIn posts from people actively discussing CRM tools, filtered by your keywords and sorted by AI relevance scoring.

***

## Competitor Monitoring

Track what your competitors and their employees are posting on LinkedIn.

```bash theme={null}
# Track competitor company pages
curl -X POST "https://api.outx.ai/api-company-watchlist" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "name": "Competitor Companies",
    "companies": [
      "https://linkedin.com/company/competitor-a",
      "https://linkedin.com/company/competitor-b",
      "competitor-c"
    ]
  }'
```

**What you get:** Every post from competitor company pages, including announcements, product updates, hiring signals, and thought leadership content.

***

## Hiring & Job Change Alerts

Detect when target accounts are hiring or when key contacts change roles.

```bash theme={null}
# Track hiring keywords
curl -X POST "https://api.outx.ai/api-keyword-watchlist" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "name": "Hiring Signals",
    "keywords": [
      {
        "keyword": "hiring",
        "required_keywords": ["VP Sales", "Head of"],
        "excluded_keywords": ["internship", "entry level"]
      },
      "excited to announce",
      "new role"
    ],
    "fetchFreqInHours": 12
  }'

# Filter by seniority level
curl -X GET "https://api.outx.ai/api-posts?watchlist_id=YOUR_ID&seniority_level=VP" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## Trending Content Discovery

Find the most engaging LinkedIn posts in your industry for content inspiration or engagement opportunities.

```bash theme={null}
# Get trending posts from your watchlist
curl -X GET "https://api.outx.ai/api-posts?watchlist_id=YOUR_ID&trending=true&sort_by=engagement" \
  -H "x-api-key: YOUR_API_KEY"

# Filter by post type and date range
curl -X GET "https://api.outx.ai/api-posts?watchlist_id=YOUR_ID&post_type=text&start_date=2026-02-01&end_date=2026-03-01&sort_by=engagement" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## Automated Engagement Pipeline

Set up a pipeline that monitors posts and automatically engages with relevant content.

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

API_KEY = "YOUR_API_KEY"
HEADERS = {"x-api-key": API_KEY}
BASE = "https://api.outx.ai"

# Step 1: Get recent relevant posts
posts = requests.get(
    f"{BASE}/api-posts",
    headers=HEADERS,
    params={
        "watchlist_id": "YOUR_WATCHLIST_ID",
        "sort_by": "relevance_first",
        "interacted": "false",  # only posts your team hasn't engaged yet
        "page": 1
    }
).json()

# Step 2: Like the top 5 most relevant posts
for post in posts["data"][:5]:
    requests.post(
        f"{BASE}/api-like",
        headers={**HEADERS, "Content-Type": "application/json"},
        json={
            "post_id": post["id"],
            "user_email": "your.email@company.com",
            "actor_type": "user"
        }
    )
    time.sleep(30)  # Wait between actions for safety
```

***

## AI Agent Integration

Use the [LinkedIn API](/docs/linkedin-api/introduction) to give AI agents direct access to LinkedIn data.

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

API_KEY = "YOUR_API_KEY"
HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}
BASE = "https://api.outx.ai"

# Fetch a profile for AI analysis
task = requests.post(
    f"{BASE}/linkedin-agent/fetch-profile",
    headers=HEADERS,
    json={"profile_slug": "target-prospect"}
).json()

task_id = task["api_agent_task_id"]

# Poll until complete
while True:
    status = requests.get(
        f"{BASE}/linkedin-agent/get-task-status",
        headers=HEADERS,
        params={"api_agent_task_id": task_id}
    ).json()

    if status["data"]["status"] == "completed":
        profile_data = status["data"]["task_output"]
        # Feed profile_data to your AI agent for analysis
        break

    time.sleep(5)
```

**Use this for:** Building AI agents that research prospects, generate personalized outreach, or analyze LinkedIn data as part of automated workflows.

***

## Webhook-Style Monitoring (Polling Pattern)

OutX doesn't currently offer webhooks, but you can build a polling-based monitoring system:

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

API_KEY = "YOUR_API_KEY"
HEADERS = {"x-api-key": API_KEY}
BASE = "https://api.outx.ai"
WATCHLIST_ID = "YOUR_WATCHLIST_ID"

seen_posts = set()

while True:
    posts = requests.get(
        f"{BASE}/api-posts",
        headers=HEADERS,
        params={
            "watchlist_id": WATCHLIST_ID,
            "sort_by": "recent",
            "page": 1
        }
    ).json()

    for post in posts.get("data", []):
        if post["id"] not in seen_posts:
            seen_posts.add(post["id"])
            # Process new post - send to Slack, CRM, AI agent, etc.
            print(f"New post by {post['author_name']}: {post['content'][:100]}")

    time.sleep(3600)  # Check every hour
```

***

## Related Resources

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/docs/api-reference/quickstart">
    Make your first API call
  </Card>

  <Card title="LinkedIn API" icon="bolt" href="/docs/linkedin-api/introduction">
    Direct LinkedIn data access
  </Card>

  <Card title="Posts API" icon="newspaper" href="/docs/api-reference/engagement/posts/get">
    All post filtering options
  </Card>

  <Card title="OutX Blog" icon="pen" href="https://www.outx.ai/blog">
    Guides and tutorials
  </Card>
</CardGroup>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can I combine multiple watchlists in a single API call?">
    No. `/api-posts` reads exactly one watchlist per call: `watchlist_id` is required and must be a single string. Passing multiple values, or omitting it, returns a 400. To read several watchlists, call `/api-posts` once per `watchlist_id`.
  </Accordion>

  <Accordion title="How do I get notified when new posts arrive?">
    There are two approaches. First, you can poll the `/api-posts` endpoint periodically with `sort_by=recent` and track which post IDs you have already seen (see the polling pattern example above). Second, you can set up Slack notifications directly in the OutX UI to receive alerts in your Slack channels without writing any code.
  </Accordion>
</AccordionGroup>

***

## Learn More

* [LinkedIn Social Listening Guide](https://www.outx.ai/blog/guide-social-listening-linkedin)
* [LinkedIn Prospecting Guide](https://www.outx.ai/blog/linkedin-prospecting-2025-guide)
* [LinkedIn API Guide](https://www.outx.ai/blog/linkedin-api-guide)
* [Automate LinkedIn Likes & Comments](https://www.outx.ai/blog/automate-linkedin-likes-comments)
* [Best LinkedIn Lead Generation Tools](https://www.outx.ai/blog/best-linkedin-lead-generation)
