Chaturbate API

... Where did you think I was getting my data from? Have you tried to use that api? It's awful. It's ALL the online performers, no filtering, no pagination, and no offline filtering either. Just a big 'ol chunk of data, but hey, if you want to download the 6Mb file every time you need to check on the top female performer online, you do you.
 
I pointed out an official source you didn't mention.
Everyone decides for himself what to use.
 
Why not open source this so we can help? Or better yet, get in touch with chaturbate so they can host it so we don't have to rely on your server. They might even slip you a cheque
 
Why not open source this so we can help? Or better yet, get in touch with chaturbate so they can host it so we don't have to rely on your server. They might even slip you a cheque

Already tried contacting Chaturbate, they wanted the source code and no mention of money.

I might open source it in the future if I lose the time I have to work on it, but I'm pretty happy working on it as a little side project at the moment.

The server is an aws ec2 free tier, so it's not going to start costing me an arm and a leg.
 
Hey all - i've forked out for a proper domain name for this little project now.

The api can be found at https://api.2kbcollective.com/v1/performer/ now. It's SSL protected and all that. Not a lot has changed in terms of content, but keep your eyes peeled, I'm going to be adding a few features into in the near future.
 
Have you been able to proceed any further with this? I myself am working on a small personal project and have ran into the only solution which is the dreaded 5-6MB file every time. I am mainly just trying to get the online/offline status of a list of models, but there seems to be no simple method to do so. Just wondering if you have found any other solutions or have further developed your API.
 
Have you done anymore with this? I'd like someway to have tweets send when a specific model comes online but I'm very green as far as any type of coding or in depth computer skills go.
 
Hey, I totally forgot about this API. I've since taken it down, but I'll set it back up again today if there are people interested in it.

Gimme a minute.
 
  • Like
Reactions: RAP
nice contribution to the forum. it'd be good if u can keep it back online
 
Well - I've rebuilt the api a little bit, it's not as fully featured as before, but it's a bit more robust, working on an actual web server (Flask python).

It's hosted @ http://2kbcollective.com/api/v1/performers

The default behaviour of the api is to return all gender types and ignores if the user is online or offline, but can be filtered like so:

Code:
http://2kbcollective.com/api/v1/performers/f

Or to return multiple genders:

Code:
http://2kbcollective.com/api/v1/performers/f+c

For reference, the available gender types are:

m - Male
c - Couple
f - Female
s - Transexual

The sorting of these users are descending viewers by default, I'll add other sort methods later on, but that's the only way for now.

To remove all offline users from the query, you can add the QS parameter online=1:

Code:
http://2kbcollective.com/api/v1/performers/f?online=1

The offset command will 'paginate' the results for you, again, the api will only ever return 20 results at a time, so to get the 2nd 'page' of results:

Code:
http://2kbcollective.com/api/v1/performers/f?online=1&offset=20

e.g. Skip the first 20 results and then get the next 20.


Finally, to query a single performer, use the singular form:

Code:
http://2kbcollective.com/api/v1/performer/laurenbrite

this will return that specific user object, so you can use that to check if a user is online or not.
 
I've also just added another end point:

Code:
http://2kbcollective.com/api/v1/meta

Gives some basic information about the current state of the site. Including how many users have come online / gone offline since the last api check, as well as a breakdown of the numbers of each gender that are currently online, a total of the online users and a total of all users that the api has stored.
 
Added a few more features:

- There are now `peak_viewers` and `peak_follower` fields for all performers - which does what it says on the tin. Stores the highest amount of viewers they've had (across all sessions)
- Added `went_offline` & `came_online` fields to all performers. These are updated when a user comes online / goes offline.
- Added a `tags` field to all users. This is a verbatim copy of the tags that a user puts on their channel, to be honest they're not overly reliable, but someone might find it useful.

- Added a new endpoint: `http://2kbcollective.com/api/v1/tags/<string:tag>` which will return a list of users that have the tag given. This is not fully featured yet as it doesn't paginate or filter on gender as of yet.
 
until it's back up we'll have to use the backup and parse ourselves chaturbate.com/affiliates/promotools/api_usersonline/
 
Naughtynewell, I would like for you to code something for me please.
 
Did realize people were actually using this, logs showed no interaction for ages. I can bring it back online if there's enough interest.

The longer it runs the more likely it is to start costing me serious money, however. So I tend to take it down and clean out the DB about once every month or so otherwise it bloats out and I start getting charged through the nose for DB storage.

If anyone has reliable, quick and cheap MongoDB hosting that they can recommend. I'm all ears.
 
I'll have a play around and get things up and running again today. There are a few small performance tweaks that I need to make.

Thanks all.
 
Hey guys,

quick update; the api is back online and running again. To keep costs to a minimum, it's not running on any kind of domain name, just the raw ip4 address:

http://3.16.31.21:7777/api/v1/performer/

It's also probably not going to be SUPER able to handle a huge amount of requests. So if you're bombarding it, expect it to be super slow / unresponsive.

Thanks!
 
Back
Top