Star Atlas Discord API
Access historical messages from the Star Atlas Discord server with a simple API.
Quick Start
cURL
JavaScript
Python
Browser
# Get messages from general channel for March 2025
curl -X GET "https://sa-discord-api.tail7aa2f7.ts.net/api/channels/799477788393996288/messages" -H "X-API-Key: YOUR_API_KEY" --data-urlencode "start=2025-03-01" --data-urlencode "end=2025-03-31"
Authentication
API Key Authentication
Request your API key from the Star Atlas team. Two authentication methods available:
Header Method (Recommended)
X-API-Key: YOUR_API_KEY
More secure, use for server-side applications
Query Parameter
?key=YOUR_API_KEY
Simpler, use for testing or browser-based apps
Endpoints
GET
List Channels
/api/channels
Get available channels with their message counts and date ranges.
Useful for discovering available channels and their data coverage.
GET
Get Messages
/api/channels/:channelId/messages
Retrieve messages with filtering and pagination support.
Main endpoint for accessing Discord messages.
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
start |
string | Start date in YYYY-MM-DD format. Must be ≥ 2025-01-01. | 2025-01-01 |
end |
string | End date in YYYY-MM-DD format | current date |
sort |
string | Sort order: 'asc' (oldest first) or 'desc' (newest first) | asc |
page |
integer | Page number for pagination | 1 |
limit |
integer | Messages per page (1-1000) | 100 |
Available Channels:
- 😎┃foundation-room
- 👽┃general
- 📊┃economic
- 📢┃announcements
- 🔔┃minor-announcements
- 🎉┃event-announcements
- 📝┃patch-notes
- 💬┃dao-chat
- 👾┃holosim
Examples
Get Latest Messages
GET /api/channels/799477788393996288/messages?start=2025-03-01&end=2025-03-31&sort=desc
Response Format
{
"messages": [
{
"messageId": "1356055212384718939",
"content": "Example message",
"timestamp": "2025-03-30T23:59:16.920Z",
"author": {
"id": "123456789",
"username": "example_user"
}
}
],
"pagination": {
"total": 8546, // Total messages matching query
"page": 1, // Current page
"pages": 86, // Total pages available
"limit": 100, // Messages per page
"hasMore": true // More pages available
},
"dateRange": {
"start": "2025-03-01T00:00:00.000Z",
"end": "2025-03-31T23:59:59.999Z"
}
}
Best Practices
- • Use smaller date ranges (1-2 months) for better performance
- • Implement caching for frequently accessed data
- • Use
sort=ascfor chronological analysis - • Check
hasMorefield for pagination handling - • Store your API key securely and never expose it in client-side code