Fortnite Adapter
Idiomark adapter for extracting personality data from Fortnite player statistics and match history.
Features
- 🎯 Player statistics - K/D ratio, win rate, matches played
- 🏆 Match history - Recent matches with placement and performance
- 📊 Playstyle analysis - Aggressive, strategic, builder, etc.
- 🎮 Mode preferences - Solo, Duo, Squad preferences
- ⏱️ Time patterns - When and how much the player plays
- 💡 Personality insights - Teamwork, persistence, creativity, competitiveness
Installation
npm install @idiomark/adapter-fortnite
Usage
import {
createFortniteAdapter,
fetchFortniteStats,
} from "@idiomark/adapter-fortnite";
// Basic usage
const adapter = createFortniteAdapter(
process.env.FORTNITE_API_KEY,
"player_username",
{ platform: "epic" },
);
// Fetch stats
const output = await adapter.getStructuredOutput({
includeMatches: true,
includeSolo: true,
includeDuo: true,
includeSquad: true,
limit: 100,
});
console.log(output.personalitySignals);
Using with CLI
# Extract from Fortnite profile
idiomark extract --fortnite \
--api-key xxx \
--account-name player_username \
-o personality.json
# With options
idiomark extract --fortnite \
--api-key xxx \
--account-name player_username \
--platform epic \
--include-matches \
-o personality.json
Authentication
API Key
The Fortnite adapter uses third-party tracker APIs since Epic Games doesn't provide a public stats API.
Popular options:
- FortniteTracker API - https://fortnitetracker.com/
- FortniteAPI - https://fortnite-api.com/
- FNTracker - https://fntracker.net/
- Register for an API key with your chosen tracker
- Use the API key when creating the adapter
const adapter = createFortniteAdapter(apiKey, "player_username");
Security Note
Warning: Treat your Fortnite API key like a password. Never commit it to version control.
Personality Signals Extracted
Gaming Style Analysis
| Style | K/D Range | Indicators |
|---|---|---|
| Aggressive | 3.0+ | High kills, low survival time |
| Strategic | <1.5 | High placement, low deaths |
| Builder | 1.5-3.0 | Creative building patterns |
| Balanced | 1.5-3.0 | Mix of combat and building |
Values Analysis
- Competitiveness - Based on K/D ratio and win rate
- Teamwork - Duo/Squad win rate vs Solo
- Strategic Thinking - Top 10 placement consistency
- Persistence - Total matches played and hours logged
- Creativity - Build/edit activity detected
Interests
- Favorite game modes (Solo, Duo, Squad)
- Weapon preferences (AR, Shotgun, Sniper, etc.)
- Map preferences
- Playlist interests
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | API key from tracker service |
accountName | string | required | Player username or Epic ID |
platform | string | 'epic' | 'epic', 'psn', 'xbl', or 'switch' |
trackerUrl | string | undefined | Custom tracker API URL |
limit | number | 100 | Max matches to fetch |
includeMatches | boolean | false | Include match history |
includeSolo | boolean | true | Include solo mode stats |
includeDuo | boolean | true | Include duo mode stats |
includeSquad | boolean | true | Include squad mode stats |
includeCreative | boolean | false | Include creative mode stats |
startDate | Date | undefined | Filter matches from this date |
endDate | Date | undefined | Filter matches until this date |
Examples
Analyze Player Performance
const adapter = createFortniteAdapter(apiKey, "Ninja");
const output = await adapter.getStructuredOutput({
includeMatches: true,
limit: 50,
});
// Get performance metrics
console.log("K/D:", output.metadata.kd);
console.log("Win Rate:", `${(output.metadata.winRate * 100).toFixed(1)}%`);
console.log("Playstyle:", output.personalitySignals.gaming.playstyle);
Compare Solo vs Team Play
const adapter = createFortniteAdapter(apiKey, "player_username");
const output = await adapter.getStructuredOutput({
includeSolo: true,
includeDuo: true,
includeSquad: true,
});
const teamwork = output.personalitySignals.values.teamwork;
console.log(`Teamwork Score: ${(teamwork * 100).toFixed(0)}%`);
Rate Limits
- 60 requests per minute (varies by tracker API)
- Automatic retry with exponential backoff when rate limited
Notes
- Epic Games does not provide a public API for player statistics
- This adapter uses third-party tracker APIs which may have their own rate limits
- Match history availability depends on the tracker service
- Some platforms (PSN, XBL) may have limited data access
License
MIT