Skip to content

feedspub/Substats

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

substats-logo

Serverless Function to Count How Many People are Subscribed to You in Your Favorite Services

Now on Cloudflare Workers Uptime Robot status Deploy Vercel

๐Ÿšฉ API endpoint ยท ๐Ÿšฆ Status monitor ยท ๐Ÿ“– Documentation

Table of contents

Why I did this?

I initially wanted to combine the subscriber numbers of Feedly and Inoreader โ€” two of the most popular RSS providers, to calculate how many people are subscribed to my blog's RSS. Then it occured to me: I could actually make this into a "Hub", where you can provide a service name, a query key, and out comes the total subscribers of all your services...Hence, I proudly introduce: Substats!

PROs

  • ๐ŸงŠ Serverless deployment, minimum overhead (powered by Cloudflare)
  • ๐Ÿš€ Ultra-fast reachablility for all services (even in mainland China!)
  • ๐ŸŽˆ Simple integration, easy-to-use API with nice badges provided by Shields.io

Further reading

Examples

๐Ÿ“– For a detailed documentation on the query format, please see: Docs | Substats Query format.

API endpoint

๐Ÿšฆ Only 'GET' requests are handled in order to integrate with badges.
https://api.spencerwoo.com/substats/

Single query

You can make a single query to request your RSS subscribers on Feedly.

GET /?source=feedly&queryKey=https://blog.spencerwoo.com/posts/index.xml

Which returns:

{ "status": 200, "data": { "totalSubs": 13, "subsInEachSource": { "feedly": 13 }, "failedSources": {} } }

You can then use the numbers in data.totalSubs in a dynamic badge:

Multiple sources with a single query string

GET /?source=feedly|inoreader|newsblur&queryKey=https://blog.spencerwoo.com/posts/index.xml

Which returns:

{
  "status": 200,
  "data": {
    "totalSubs": 49,
    "subsInEachSource": {
      "feedly": 17,
      "inoreader": 29,
      "newsblur": 3
    },
    "failedSources": {}
  }
}

Enter the badge! (NewsBlur is too slow to load, below is a static badge for demo purposes.)

Multiple queries

GET /?source=telegram&queryKey=realSpencerWoo&source=sspai&queryKey=spencerwoo&source=twitter&queryKey=realSpencerWoo

Which returns:

{
  "status": 200,
  "data": {
    "totalSubs": 1552,
    "subsInEachSource": {
      "telegram": 786,
      "sspai": 638,
      "twitter": 128
    },
    "failedSources": {}
  }
}

And of course, our badges!

Supported services

๐Ÿ“– For a detailed documentation on the API request rules of each service, please see: Docs | Substats API Details.

afdian bilibili coolapk feedly Feeds Pub github inoreader instagram jike medium neteaseMusic newsblur reddit sspai steam telegram twitter unsplash weibo zhihu

Contributing

Development

This is a serverless function deployed on Cloudflare Workers. Please check: Docs | How to contribute if you want to contribute.

Contributors

This project exists thanks to all the people who contribute.

Sponsoring

Thank you for considering donations and sponoring our project. We currently support sponsoring via Open Collective.

Backers Sponsors
Support this project by becoming a backer. Thank you to all our backers! ๐Ÿ™ [Become a backer] Support this project by becoming a sponsor. Your logo will show up here with a link to your website. ๐ŸŒ [Become a sponsor]

ๅฏนไบŽๅ›ฝๅ†…็”จๆˆท๏ผŒๆˆ‘ไปฌๆ”ฏๆŒ็›ดๆŽฅ้€š่ฟ‡ๅพฎไฟกๅ’Œๆ”ฏไป˜ๅฎ่ฟ›่กŒๅฐ้ข่ตžๅŠฉ๏ผ

ๅพฎไฟกๆ”ฏไป˜ ๆ”ฏไป˜ๅฎๆ”ฏไป˜
ๅพฎไฟกๆ”ฏไป˜ ๆ”ฏไป˜ๅฎๆ”ฏไป˜

ๆ‚จไนŸๅฏไปฅๅˆฉ็”จใ€Œ็ˆฑๅ‘็”ตใ€ๆฅๅฏนๆˆ‘่ฟ›่กŒๆ”ฏๆŒ๏ผ

็ˆฑๅ‘็”ต

Disclaimer

All APIs used in this project are by no means in any relationship with the original content provider. APIs are subject to change. Your mileage may vary, so use this at your own risk.


๐Ÿ“ˆ๐Ÿ“‰ Substats ยฉSpencer Woo. Released under the MIT License.

Authored and maintained by Spencer Woo.

@Portfolio ยท @Blog ยท @GitHub

About

๐Ÿ“ˆ๐Ÿ“‰ Shhhh...we're counting your subscribers!

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.2%
  • CSS 5.8%