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

# Platform Identifiers

> Understanding profile IDs, content IDs, and game IDs across different platforms

Each platform uses different ID formats for profiles, content, and games. Understanding these formats is essential for working with the Streamforge External API.

## Profile IDs

Profile IDs are platform-specific creator identifiers:

### Twitch

* **Format**: Numeric string (e.g., `"484563826"`)
* **How to find**: Twitch channel URL or API
* **Example**: `https://twitch.tv/streamer123` → Channel ID `484563826`

### YouTube

* **Format**: Channel ID string (e.g., `"UCaY_-ksFSQtTGk0y1HA_3YQ"`)
* **How to find**: YouTube channel URL or API
* **Example**: `https://youtube.com/@channel` → Channel ID `UCaY_-ksFSQtTGk0y1HA_3YQ`

### TikTok

* **Format**: Numeric string (e.g., `"1234567890"`)
* **How to find**: TikTok profile URL or API
* **Note**: TikTok IDs may change; use display names for stability

### Instagram

* **Format**: Numeric string (e.g., `"1234567890"`)
* **How to find**: Instagram profile data or API
* **Note**: Instagram user IDs are stable numeric identifiers

## Content IDs

Content IDs identify individual streams, videos, or posts:

### Twitch

* **Format**: Numeric string (e.g., `"324628972153"`)
* **Type**: Video ID or stream ID
* **Example**: `https://twitch.tv/videos/324628972153`

### YouTube

* **Format**: Alphanumeric string (e.g., `"dQw4w9WgXcQ"`)
* **Type**: Video ID
* **Example**: `https://youtube.com/watch?v=dQw4w9WgXcQ`

### TikTok

* **Format**: Numeric string (e.g., `"7123456789"`)
* **Type**: Video ID
* **Example**: `https://tiktok.com/@user/video/7123456789`

### Instagram

* **Format**: Post shortcode (e.g., `"CxYz123AbCd"`)
* **Type**: Post/Video ID
* **Example**: `https://instagram.com/p/CxYz123AbCd`
* **Note**: Instagram uses alphanumeric shortcodes in URLs

## Game IDs

Game IDs vary by platform and can reference IGDB data:

### Twitch Game ID

* **Format**: Numeric string (e.g., `"2011938005"`)
* **Source**: Twitch's game taxonomy
* **Example**: Used in `GET /platforms/twitch/games/{game_id}`

### YouTube Game Channel ID

* **Format**: Channel ID string (e.g., `"UCf_7CrLpgmot2vPKYwx5zQg"`)
* **Source**: YouTube's game channel taxonomy
* **Example**: Used in `GET /platforms/youtube/games/{game_id}`

### IGDB Game ID

* **Format**: Numeric string (e.g., `"189165"`)
* **Source**: IGDB (Internet Game Database)
* **Example**: Used in `GET /platforms/igdb/games/{game_id}`
* **Note**: IGDB IDs are cross-platform identifiers

## Finding Profile IDs

### Twitch

```bash theme={null}
# Using Twitch API
curl -H "Client-ID: YOUR_CLIENT_ID" \
  "https://api.twitch.tv/helix/users?login=streamer123"
```

### YouTube

```bash theme={null}
# Extract from channel URL
# https://youtube.com/@channel → Channel ID via API
curl "https://www.googleapis.com/youtube/v3/channels?part=id&forUsername=channel&key=YOUR_KEY"
```

### TikTok

```bash theme={null}
# Use TikTok API or extract from profile URL
# Profile URLs contain user IDs
```

### Instagram

```bash theme={null}
# Use Instagram API or extract from profile data
# Profile IDs are numeric user identifiers
```

## Cross-Platform Matching

The Socials endpoint provides cross-platform matching:

```json theme={null}
{
  "payload": {
    "socials": [
      "profiles": [
        { "platform_id": "twitch", "id": "83232866", "followers": 17325979 },
        { "platform_id": "youtube", "id": "UCaY_-ksFSQtTGk0y1HA_3YQ", "followers": 15000000 }
      ]
    }
  }
}
```

Use the socials response to find the same creator across platforms.

## ID Validation

The API validates IDs but doesn't provide validation endpoints. To verify IDs:

1. **Make a request**: Try fetching the resource
2. **Check response**: 404 means invalid or non-existent ID
3. **Handle gracefully**: Missing resources are normal

## Best Practices

<Tip>
  Store profile IDs alongside display names for better user experience and easier debugging.
</Tip>

* **Store IDs, not URLs**: URLs can change; IDs are stable
* **Validate before bulk requests**: Check IDs exist before bulk operations
* **Use socials data**: Leverage cross-platform socials data for multi-platform workflows
* **Handle missing IDs**: Some IDs may not exist; handle 404s gracefully
* **Document ID sources**: Keep track of where IDs come from for debugging

## Normalized Terminology

The API normalizes platform-specific terminology to provide consistency across all platforms.

| API Term    | Twitch    | YouTube     | TikTok    | Instagram |
| ----------- | --------- | ----------- | --------- | --------- |
| `followers` | Followers | Subscribers | Followers | Followers |

<Note>
  This normalization only applies to equivalent concepts. On YouTube, "subscribers" represents the free channel subscription count and maps to `followers`. On Twitch, `followers` remains `followers` - the separate paid "subscriber" concept is not exposed through this field.
</Note>

## Common ID Formats Summary

| Resource | Twitch         | YouTube                 | TikTok         | Instagram                |
| -------- | -------------- | ----------------------- | -------------- | ------------------------ |
| Profile  | Numeric string | Channel ID (UC...)      | Numeric string | Numeric string           |
| Content  | Numeric string | Video ID (alphanumeric) | Numeric string | Shortcode (alphanumeric) |
| Game     | Numeric string | Channel ID (UC...)      | N/A            | N/A                      |

## Example: Working with IDs

```javascript theme={null}
// Twitch profile
const twitchProfileId = "484563826";
const profile = await fetch(`/platforms/twitch/profiles/${twitchProfileId}`);

// YouTube content
const youtubeVideoId = "dQw4w9WgXcQ";
const content = await fetch(`/platforms/youtube/content/${youtubeVideoId}`);

// Instagram profile
const instagramProfileId = "1234567890";
const igProfile = await fetch(`/platforms/instagram/profiles/${instagramProfileId}`);

// Instagram content (using post shortcode)
const instagramPostCode = "CxYz123AbCd";
const igContent = await fetch(`/platforms/instagram/content/${instagramPostCode}`);

// IGDB game
const igdbGameId = "189165";
const game = await fetch(`/platforms/igdb/games/${igdbGameId}`);

// Cross-platform matching
const socials = await fetch(`/platforms/twitch/profiles/${twitchProfileId}/socials`);
const socialProfiles = socials.payload;
// Now you have all platform IDs for this creator
```

<Warning>
  Don't assume ID formats are consistent across platforms. Always use the correct format for each platform.
</Warning>
