Skip to content

Latest posts

Changelog for December 13th, 2024

YouTube

The "Latest video" endpoint has received some improvements:

  • You can use the shorts_url parameter to get a URL that goes to the "Shorts layout" of YouTube, if your video is a "Shorts" video - Feature request on GitHub (issue #113)
    • Example: https://decapi.me/youtube/latest_video?shorts_url=1&handle=@NileRedExtra
    • Regular videos will still give you a URL that looks like: https://youtu.be/VIDEO_ID_HERE.
    • However, "Shorts" (videos under 1 minute) will give you a URL that looks like: https://youtube.com/shorts/VIDEO_ID_HERE.
  • You can now pass your YouTube @ 'handle' instead of channel ID or legacy username. This was previously not supported.

Maintenance & Infrastructure Changes - November 2024

There will be some maintenance and infrastructure upgrades to DecAPI, at some point in the near-ish future. There's no set date yet, as it honestly depends on when I have the time. Might happen this Sunday (November 24th), might be a week or two from now.

Assuming I have configured things properly, there should be minimal downtime (a few minutes), but I've been doing this for long enough to know that anything can happen in these cases.
Of course, I will be doing some testing beforehand to make sure everything works as expected. This testing will not affect the live version of DecAPI.

Once the maintenance is happening, updates will be posted in the Discord server in the #announcements channel and on Bluesky.

A more technical explanation can be found below.


As listed on the server setup page, DecAPI effectively runs on 4 servers total. 3 for the actual DecAPI application and a single server for the database and cache (Redis). So far, that database / cache server has been very reliable. No extended downtime has been caused due to that server specifically going down. However, since it is a single server, it's also a single point of failure. If that server goes down, DecAPI goes down completely until that server comes back up.

The infrastructure upgrades will go from 1 database / cache server to 3 database / cache servers (a cluster), with their own load balancer.

In the beginning only the database will be migrated to the new cluster. I wanna spend a few days looking at performance to make sure it's all good. Once the database server has been stable for a while, the cache server will also be pointed to the new cluster.

The plan is essentially this:

  • Reduce DecAPI's load balancer to point to only 1 of the application servers. DecAPI might slow down a bit during this time.
  • Dump the current database data, import into new database cluster
  • Point the 2 leftover application servers to the new database cluster. Run a few test requests to make sure they can connect to the database cluster without issues.
  • Put the leftover application servers back behind the load balancer, remove the "old" application server.
  • Update the configuration on the "old" application server to point to the new DB cluster.
  • Put the "old" (now updated) application server behind the load balancer again, making DecAPI run on 3 application servers as normal.

Surely nothing could go wrong :)

This is an archived post from August 2023, originally posted on GitHub Gist.

I should've mentioned this when I first saw the original announcement, but I suppose now is better than never.

As announced on the Twitch developer forums, at September 6, 2023 5:00:00 PM UTC Twitch will begin the process of shutting down the now deprecated "Get User Follows" API endpoint.

This will affect the following DecAPI endpoints:

It would technically also affect the "followcount" API, but I plan on migrating that to their new API endpoint, so that should keep working as-is.

As for the other 4 endpoints listed above, please consider them to be deprecated in the short-term. Primarily 2 reasons for this:

  1. As I've stated in the past, I don't like having to deal with tokens (such as what subcount/subpoints require), which is now going to be required to retrieve the "follower relationship" between a channel and a user in the new API. The follower count of a channel does not require any authentication, so that should be fine as mentioned earlier.
  2. While DecAPI currently has support for authentication (subcount/subpoints), the implementation wasn't designed to support different sets of authentication permissions. I really want to revamp that whole system before I even attempt to tackle support of follower APIs and subscriber APIs side-by-side.

Even if I do decide to re-implement follower APIs, I plan on dropping both /twitch/followers (list of a channel's followers) and /twitch/following (list of channels the specified user is currently following - requires a separate authentication permission anyway) indefinitely. My focus would then be primarily /twitch/followed (the date & date when a specific user followed a specific channel) and /twitch/followage (how long since a specific user followed a specific channel), but once again this isn't going to be something I do short-term.

Twitter Changes - June 2023

This is an archived post from June 2023, originally posted on GitHub Gist.
It is no longer relevant to the current version of DecAPI, as the Twitter APIs have been deprecated from DecAPI.

June 6th, 2023

Following up on yesterday's Twitter changes:

  • search (and strict) parameters should now work again.
  • include_replies will also work.
  • The initial re-implementation yesterday would exclude pinned tweets regardless of when they were posted, which has now been fixed. Pinned tweets can now be included as a "latest tweet", assuming it actually is the latest tweet or matches search.

Some things that I forgot to mention yesterday: - Tweets are cached for up to 2 minutes (120 seconds) per user and depending on with/without replies. - Essentially that means if you request the latest tweet of a user without replies first, and with replies afterwards, they will be cached separately. - Due to the way tweets are now retrieved, an uncached request may be a bit slow (a few seconds). Cached requests should be relatively fast (< 1 second).


June 5th, 2023

The DecAPI Twitter endpoints recently broke, due to the Twitter API changes announced a few months back (let's ignore my own procrastination for now).

Some of them have now been fixed, mainly "latest tweet" and "latest tweet URL". The "fix" isn't fully complete, has some functionality lacking and is a bit experimental. There's a chance it will completely break again in the near future, but we'll see.

One issue with the current code is that if your latest tweet is also your pinned tweet, it will skip it. I'll fix it another day. 🙃

Functionality that no longer works, though I don't think many people relied on them as much: - search - Filters tweet by text. - strict as well, since it was used alongside search - include_replies - Tweets that are replies to other users on Twitter cannot be retrieved at this time, though this isn't much different from the default behavior. - skip - Only the latest tweet will be fetched

Functionality that should still work: - howlong - How long since the tweet was posted. - url - Includes the direct URL to the tweet.

If you notice any oddities with how the tweets are formatted, please let me know in #support on Discord or via email: [email protected]*. Ideally with a link to the tweet so I can test with the exact case.

* I don't really check Twitter as often anymore, so I'll probably miss any DMs, tweets/replies about any issues.