Skip to content

Work in progress

This documentation page is currently work in progress.
Not all existing DecAPI endpoints are documented here yet - mostly Twitch and YouTube endpoints. The rest of the endpoints should have accurate documentation :)
For the currently active documentation, please visit docs.decapi.me.

Cached endpoint

This endpoint is cached and won't always be fully up-to-date. See the Cached endpoints page for more information.

Subcount - Subscriber count for a Twitch channel

Retrieves the current subscriber count for the specified Twitch channel.

Requires channel owner to have authorized DecAPI for subscriber access

The channel owner must authorize DecAPI to access their subscriber data in order for this endpoint to return subscriber information.

If the channel owner already uses other DecAPI Twitch endpoints with subscriber data access, such as random subscriber or subpoints, then no further action is needed.

If you are the channel owner, you can authorize DecAPI via this link: Authorize DecAPI for Twitch Subscriber Access

Endpoint URL

https://decapi.me/twitch/subcount/CHANNEL_USERNAME_HERE

Required URL parameters

  • channel - Required - Twitch channel to retrieve the subscriber count for.

Query parameters

  • subtract - Optional
    • Subtracts the specified integer from the returned subscriber count. Example: if you have 102 subs and set subtract=2, the endpoint will return 100.
    • There's effectively no minimum or maximum, so with a high enough subtraction you may get negative numbers.

Notes

  • As of October 2nd, 2021 the subscriber count no longer includes lifetime bot subscriptions or the broadcaster's own subscription. You may need to adjust (or remove) the subtract parameter if it was previously used to adjust it for these factors.

Examples

Examples for bots

Nightbot

Note: Nightbot will automatically convert variables, such as $(channel) or $(touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.

Fossabot

Note: Fossabot will automatically convert variables, such as $(channel) or $(user.login) to the correct channel name / username, when the command is used.
You do not have to change those variables.

StreamElements

Note: StreamElements will automatically convert variables, such as ${channel} or ${touser} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Chat Bot

Note: Streamlabs Chat Bot will automatically convert variables, such as $mychannel or $touserid to the correct channel name / username, when the command is used.
You do not have to change those variables.

Streamlabs Cloudbot

Note: Streamlabs Cloudbot will automatically convert variables, such as {channel.name} or {touser.name} to the correct channel name / username, when the command is used.
You do not have to change those variables.

Deepbot

Note: Deepbot will automatically convert variables, such as @stream@ or @user@ to the correct channel name / username, when the command is used.
You do not have to change those variables.

PhantomBot

Note: PhantomBot will automatically convert variables, such as (channelname) or (touser) to the correct channel name / username, when the command is used.
You do not have to change those variables.