Thread Count is a service that allows you to generate custom status badges displaying Meta's Threads.net follower counts. You can customize the badge color, style, width, scale, label color, and more. The generated badges are in SVG format and can be easily embedded into your markdown files, websites, or any other platform that supports SVG images.
The Thread Count API was created to provide an easy way for users to showcase their Threads.net follower counts using customizable status badges. Whether you want to display your follower count on your personal blog, project documentation, or social media profiles, this API enables you to generate visually appealing badges that suit your preferences.
The Thread Count API is built using the following technologies:
- Node.js: A JavaScript runtime environment.
- Express.js: A fast and minimalist web framework for Node.js.
- Threads Unofficial API: A reverse-engineered Node.js/TypeScript client for Threads.
- Badgen: A library for generating SVG badges.
- Gradient Badge: A library for applying gradients to badges.
- Swagger UI Express: A middleware for rendering Swagger UI documentation.
- Clone this repository to your local machine.
- Navigate to the
thread-count
directory. - Install the dependencies by running
npm install
. - Start the server by running
npm start
. - The bot will be accessible at
http://localhost:{PORT}
(default port is 3000). - Access the
/thread-count/:username
endpoint to trigger the bot and generate a badge for the specified username.
The base URL for the Thread Count API is https://thread-count.vercel.app
.
To get a badge displaying an Instagram follower count, make a GET request to the following endpoint:
/thread-count/:username
Replace :username
with the desired Instagram username.
The /thread-count/:username
endpoint supports the following query parameters:
color
(optional): The color of the badge. Default:blue
.style
(optional): The style of the badge. Default:flat
.width
(optional): The width of the badge icon. Default:13
.scale
(optional): The scale of the badge. Default:1
.labelColor
(optional): The color of the badge label. Default:black
.icon
(optional): Whether to include the badge icon. Default:true
.label
(optional): The label text for the badge. Default:Thread Count
.gradient
(optional): Whether to apply a gradient to the badge. Default:true
.
To use a badge in a markdown file, simply copy the markdown code and paste it into your file.
<a href="https://www.threads.net/{your-username}">
<img src="https://thread-count.vercel.app/thread-count/{your-username}" alt="My Thread Count">
</a>
OR
![https://www.threads.net/{your-username}](https://thread-count.vercel.app/thread-count/{your-username})
You can use any valid HEX color or pick from a predefined set of named colors (blue
is the default if gradients is disabled).
color | demo |
---|---|
blue (default) |
|
green |
|
yellow |
|
orange |
|
red |
|
pink |
|
purple |
|
4B0082 (Hex code for Indigo) |
You can use any valid style or pick from a predefined set of styles (flat
is the default).
style | demo |
---|---|
flat (default) |
|
classic |
You can use any valid width or pick from a predefined set of widths (13
is the default).
width | demo |
---|---|
13 (default) |
|
20 |
|
30 |
You can use any valid scale or pick from a predefined set of scales (1
is the default) (does not apply well in GitHub READMEs as image tags, only as link)
scale | demo |
---|---|
1 (default) |
|
1.5 |
|
2 |
You can use any valid HEX color or pick from a predefined set of named colors (black
is the default).
labelColor | demo |
---|---|
black (default) |
|
white |
|
gray |
|
red |
|
green |
You can enable or disable the badge icon (true
is the default).
icon | demo |
---|---|
true (default) |
|
false |
You can use any valid label or pick from a predefined set of labels (Thread Count
is the default).
label | demo |
---|---|
Thread Count (default) |
|
Follower Count |
|
Followers |
You can enable or disable the badge gradient (true
is the default).
gradient | demo |
---|---|
true (default) |
|
false |
- Threads Unofficial API: https://github.com/junhoyeo/threads-api
- Badgen: https://github.com/badgen/badgen
- Gradient Badge: https://github.com/bokub/gradient-badge
- Swagger UI Express: https://github.com/scottie1984/swagger-ui-express