API Documentation

API Usage Guide

Learn how to integrate the GitHub Visitor Counter into your profile with our simple API

Quick Start
Get started in seconds with this basic example
![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME)

Replace YOUR_USERNAME with your GitHub username

API Endpoint
https://github-visitor-counter-tau.vercel.app/api
Display Modes
Choose from four different counter visualization styles

Top Countries (default)

Shows flags of top visiting countries

displayMode=topCountries

Flag Map

World map visualization of visitors

displayMode=flagMap

Flags From

Filter visitors by country (US/CA)

displayMode=flagsFrom

Mini Counter

Compact counter display

displayMode=miniCounter
Parameters
All available configuration options

Required Parameters

ParameterTypeDescription
usernamestringYour GitHub username

Common Parameters (All Modes)

ParameterTypeDefaultValues
displayModestringtopCountriestopCountries, flagMap, flagsFrom, miniCounter
themestringdefaultdefault, dark, github, github_dark, transparent
labelstringVisitorsAny text or "none" to hide
showcountbooleantruetrue, false
bgstringtheme defaultHex color without # (e.g., 0D1117)
textstringtheme defaultHex color without # (e.g., C9D1D9)
borderstringtheme defaultHex color without # (e.g., 30363D)

Top Countries & Flags From Modes

ParameterTypeDefaultValues
columnsnumber21-8
maxflagsnumber101-250
showlabelsbooleanfalsetrue, false (show country names)
visitortypestringnumbernumber, percentage
sizestringmediumsmall, medium, large

Flags From Mode Specific

ParameterTypeDefaultValues
flagsFromCountrystringusus, ca

Flag Map Mode Specific

ParameterTypeDefaultValues
mapSizestringsmalltiny, small, medium, large

Mini Counter Mode Specific

ParameterTypeDefaultValues
miniDisplaystringflagsflags (flag count), pageviews (page views)
Example Configurations

Top Countries - Dark Theme

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&displayMode=topCountries&theme=dark)

Top Countries - Custom Layout (4 columns, 16 flags)

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&displayMode=topCountries&columns=4&maxflags=16)

Flag Map - Medium Size

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&displayMode=flagMap&mapSize=medium)

Flags From US - GitHub Dark Theme

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&displayMode=flagsFrom&flagsFromCountry=us&theme=github_dark)

Mini Counter - Transparent Theme

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&displayMode=miniCounter&theme=transparent)

Minimal (No label, no count)

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&label=none&showcount=false)

Custom Colors

![](https://github-visitor-counter-tau.vercel.app/api?username=YOUR_USERNAME&bg=161B22&text=E6EDF3&border=30363D)
Important Notes
1

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.

2

Caching

Responses are cached for 1 hour (3600 seconds) for optimal performance. The counter updates automatically.

3

Privacy

No personal data is collected. Only country-level analytics are tracked by the Flag Counter service.

4

Four Display Modes

Choose from Top Countries, Flag Map, Flags From (US/CA), or Mini Counter to best showcase your visitor statistics.

5

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.

Ready to create your counter?

Use our interactive dashboard for an easy visual configuration experience