Code::Stats API
Overview
Code::Stats is a free API that tracks programming activity by language, recording XP points earned through coding. You can retrieve a user's total stats, XP per language, and recent activity history. It is a fun way to add developer activity statistics to portfolios or personal dashboards.
Beginner Tip
Code::Stats profiles are public by default, so you can query any username without authentication — perfect for adding your coding stats to a personal website with zero setup.
Available Data
Example Response
{
"name": "Bohemian Rhapsody",
"artist": "Queen",
"album": "A Night at the Opera",
"duration_ms": 354000,
"popularity": 92,
"preview_url": "https://p.scdn.co/mp3-preview/..."
} Field Reference
username The Code::Stats username whose data is returned. total_xp Total XP accumulated by the user across all languages. new_xp XP earned in the current 24-hour period (resets daily). languages Map of language names to their XP stats objects. languages[name].xps Total XP earned for that programming language. languages[name].new_xps XP earned for that language in the current 24-hour window. Implementation Example
const url = "https://codestats.net/api-docs";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Airtable
⭐ Beginner's PickAirtable's REST API lets you read, create, update, and delete records in any Airtable base as if it were a flexible database.
Api2Convert
Api2Convert is an online file conversion API that supports converting between hundreds of formats including documents, images, audio, and video files.
apilayer pdflayer
⭐ Beginner's PickThe pdflayer API by apilayer converts any HTML snippet or public URL into a high-quality PDF file with a simple GET or POST request.
Asana
⭐ Beginner's PickThe Asana API gives you full programmatic access to your Asana workspace — tasks, projects, users, comments, and more.
Clockify
⭐ Beginner's PickClockify is a free time-tracking API that lets you manage workspaces, projects, clients, and time entries programmatically.