GET /profile-views

Returns an SVG badge displaying the view count for a specific page/profile. Automatically increments the view count unless increment=false is specified.

Query parameters

  • user string

    Username or identifier for the profile

    Default value is EXELVI.

  • page string

    Page identifier to track views for

    Default value is github-profile.

  • style string

    Visual style of the badge

    Values are modern, flat, flat-square, for-the-badge, or plastic. Default value is modern.

  • color array[string]

    Badge color(s) as hex values. Can be specified multiple times for gradients. The '#' prefix is optional (e.g., both "0366d6" and "#0366d6" work).

  • increment boolean

    Whether to increment the view count. Set to 'false' to only display the current count without incrementing.

    Default value is true.

Responses

  • 200 image/svg+xml

    Successfully generated badge SVG

    Hide headers attributes Show headers attributes
    • Content-Type string
    • Cache-Control string

      No-cache policy to ensure fresh counts

    • Pragma string
    • Expires string
  • 500 image/svg+xml

    Error generating badge

    Hide headers attribute Show headers attribute
    • Content-Type string
GET /profile-views
curl \
 --request GET 'http://localhost:3000/api/profile-views'
Response examples (200)
# Headers
Content-Type: image/svg+xml
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0

# Payload
string
Response examples (500)
# Headers
Content-Type: image/svg+xml

# Payload
string