API Usage Guide
Learn how to integrate the GitHub Visitor Counter into your profile with our simple API
https://github-visitor-counter-tau.vercel.app/apiTop Countries (default)
Shows flags of top visiting countries
displayMode=topCountriesFlag Map
World map visualization of visitors
displayMode=flagMapFlags From
Filter visitors by country (US/CA)
displayMode=flagsFromMini Counter
Compact counter display
displayMode=miniCounterRequired Parameters
| Parameter | Type | Description |
|---|---|---|
| username | string | Your GitHub username |
Common Parameters (All Modes)
| Parameter | Type | Default | Values |
|---|---|---|---|
| displayMode | string | topCountries | topCountries, flagMap, flagsFrom, miniCounter |
| theme | string | default | default, dark, github, github_dark, transparent |
| label | string | Visitors | Any text or "none" to hide |
| showcount | boolean | true | true, false |
| bg | string | theme default | Hex color without # (e.g., 0D1117) |
| text | string | theme default | Hex color without # (e.g., C9D1D9) |
| border | string | theme default | Hex color without # (e.g., 30363D) |
Top Countries & Flags From Modes
| Parameter | Type | Default | Values |
|---|---|---|---|
| columns | number | 2 | 1-8 |
| maxflags | number | 10 | 1-250 |
| showlabels | boolean | false | true, false (show country names) |
| visitortype | string | number | number, percentage |
| size | string | medium | small, medium, large |
Flags From Mode Specific
| Parameter | Type | Default | Values |
|---|---|---|---|
| flagsFromCountry | string | us | us, ca |
Flag Map Mode Specific
| Parameter | Type | Default | Values |
|---|---|---|---|
| mapSize | string | small | tiny, small, medium, large |
Mini Counter Mode Specific
| Parameter | Type | Default | Values |
|---|---|---|---|
| miniDisplay | string | flags | flags (flag count), pageviews (page views) |
Top Countries - Dark Theme
Top Countries - Custom Layout (4 columns, 16 flags)
Flag Map - Medium Size
Flags From US - GitHub Dark Theme
Mini Counter - Transparent Theme
Minimal (No label, no count)
Custom Colors
Unique Counters
Each unique combination of parameters creates a separate counter on Flag Counter's server. This allows you to have multiple counters with different styles.
Caching
Responses are cached for 1 hour (3600 seconds) for optimal performance. The counter updates automatically.
Privacy
No personal data is collected. Only country-level analytics are tracked by the Flag Counter service.
Four Display Modes
Choose from Top Countries, Flag Map, Flags From (US/CA), or Mini Counter to best showcase your visitor statistics.
Powered by Flag Counter
This service acts as a proxy to the Flag Counter API, providing an easy-to-use interface specifically designed for GitHub profiles.