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

# Competitor Content Analysis

> Find and analyze your competitors' best-performing content

Discover what content works for your competitors, analyze their hooks and formats, and organize findings into folders.

**Total credit cost:** \~105 credits | **Time:** \~2 minutes

## Step 1 — Search for competitor content

Use Content Radar to find videos in your niche. Write a specific, detailed query for best results.

```javascript theme={null}
// 100 credits
const search = await fetch('https://api.reel25.com/api/v1/radar/search', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer reel25_sk_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: 'UGC product review videos for skincare brands with before and after results',
    platform: 'tiktok',
  }),
});
const { data } = await search.json();
const searchId = data.searchId;
```

## Step 2 — Poll for results

Radar searches run asynchronously. Poll every 5-10 seconds until status is `completed`.

```javascript theme={null}
let results;
while (true) {
  const res = await fetch(
    `https://api.reel25.com/api/v1/radar/search/${searchId}`,
    { headers: { 'Authorization': 'Bearer reel25_sk_...' } }
  );
  results = await res.json();

  if (results.data.status === 'completed') break;
  if (results.data.status === 'failed') throw new Error(results.data.error);
  await new Promise(r => setTimeout(r, 5000));
}

console.log(`Found ${results.data.videos.length} videos`);
console.log(`Intent: ${results.data.detectedIntent}`);
```

## Step 3 — Create a folder and organize results

```javascript theme={null}
// Free
const folder = await fetch('https://api.reel25.com/api/v1/folders', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer reel25_sk_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Skincare Competitors Q1' }),
});
const folderId = (await folder.json()).data.id;
```

## Step 4 — Track top videos and add to folder

```javascript theme={null}
// Free — track the top 10 videos by composite score
const topUrls = results.data.videos
  .slice(0, 10)
  .map(v => v.url);

const tracked = await fetch('https://api.reel25.com/api/v1/videos/bulk-track', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer reel25_sk_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ urls: topUrls }),
});
```

## Step 5 — Run AI analysis on the best video

```javascript theme={null}
// 5 credits
const bestVideo = results.data.videos[0];
// Note: AI analysis requires the video to be tracked first
const analysis = await fetch(
  `https://api.reel25.com/api/v1/video-analysis/${videoId}/analyze`,
  {
    method: 'POST',
    headers: { 'Authorization': 'Bearer reel25_sk_...' },
  }
);
```

Poll `GET /video-analysis/{videoId}` every 10 seconds until complete. You'll get hook style, structure breakdown, CTA detection, UGC assessment, and more.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.