You may have seen my post on the number of developers on Roblox, which I posted on the RTrack Blog. The article finishes with a figure of 157,000 developers who have at least 1,000 visits across all of their games and games under their groups.
This article was very popular, and I thought since I calculated this dataset already it could be reused by developers for something else. That’s why you can now access this data via a web API in your game with HTTP Service, or your website. The endpoint returns the total number of visits the user has across all their games (including groups) as well as an ‘IsDeveloper’ parameter which shows for users with over 1,000 visits.
Why not just use Roblox APIs for this?
RTrack’s API checks all of the games under a user account, and all of the games under a players groups. This could easily be in the hundreds of games, and therefore could potentially take 100s of requests to do manually with Roblox APIs. As RTrack already has a large dataset this can be done in less than a second and in a single request.
Ideas for using this API
This API could be used to give developers perks in your games, give them a tag in chat or above their head, or maybe you could make a game entirely focused around the number of visits a player has. Like this!
What happens if I go over 3,000 requests?
The rate over 3,000 requests is $0.0001/request. In other words, about 10 cents per 1,000. That means if you got 10,000 visits you would need to pay 20 cents with batched requests, or $1 with individual requests.
Implementation Instructions
I went ahead and wrote a quick module to allow easy implementation into your game
local module = {}
local HttpService = game:GetService("HttpService")
-- Constants
local RapidAPIKey = "YOUR_KEY_HERE"
-- headers
local headers = {
['x-rapidapi-host'] = "roblox-current-and-historical-data.p.rapidapi.com",
['x-rapidapi-key'] = RapidAPIKey
}
local url = "https://roblox-current-and-historical-data.p.rapidapi.com/IsUserDeveloper?UserId="
function module.GetResponseForUserId(userid)
local completeurl = url .. userid
local response = HttpService:GetAsync(completeurl, false, headers)
response = HttpService:JSONDecode(response)
return response -- {"IsDeveloper":true,"TotalVisits":1234, "UserId":1234}
end
function module.GetResponseForUserIds(userids)
local completeurl = url .. table.concat(userids, ",")
local response = HttpService:GetAsync(completeurl, false, headers)
response = HttpService:JSONDecode(response)
return response -- [{"IsDeveloper":true,"TotalVisits":1234, "UserId":1234}, {"IsDeveloper":true,"TotalVisits":1234, "UserId":1234}]
end
return module
After you have signed up for the RapidAPI API, just take your API key and put it in the section that says “YOUR_KEY_HERE”. Then place the code in a ModuleScript (server side, or your key will be public), and use Module.GetResponseForUserId(userid) to get the data for that player.
What data does the API return?
The API returns JSON data in this format, giving the number of visits under games owned by the player, or games owned by groups that the player owns. If the number is more than 1,000 the IsDeveloper parameter will be true, but you can decide this threshold yourself by checking the visit count. Lastly, I’ve just recently added the Global rank of this player across all developers.
{"IsDeveloper":true,"TotalVisits":1234, "UserId":1234, "GlobalRank": 1234}