How do I get the amount of likes my game has?

I want a progress bar inside my game that displays the amount of likes I have and a goal.

I just need to know how to see the likes from a script, I can make everything else from that.

2 Likes

Try using another website to send the API requests to Roblox.

1 Like

Currently the only way to do this would be through using a proxy which scrubs for the information, Roblox doesn’t allow you to get the likes of a game through its own system. This however, is quite complicated.

1 Like

I’m a beginner in HttpService so I don’t think you can because roblox has it where you can’t return any information using a roblox link. There might be a website im not sure

1 Like

I had a similar thread to this - however, since you’re wanting to gain the votes, you’d use:

local http = game:GetService("HttpService") --obtaining the service for GETting
local placeId = --your placeId
--since the game's API needs a universeId oddly, we can get it by:
local universeId = http:GetAsync("http://api.rprxy.xyz/universes/get-universe-containing-place?placeid="..placeId)
--hence it returns with a string, we can turn it into numbers (removing text), in a string, by:
universeId = universeId:gsub("[^%d%.%-]", "") --can be applied onto anything
--now, it's time to get the place's data after all that complicity
local get = http:GetAsync("http://games.rprxy.xyz/v1/games/votes?universeIds="..universeId)
--turn it into a table
local data = http:JSONDecode(get)
--now we can get data from tables.
print(data["data"][1]) --basically made as: data = {["data"] = {upVotes = 0, downVotes = 0, id = universeId}}

Acknowledge that the proxy, rprxy, is overrated - therefore in a risk of obtaining an HTTP error for sending “too many requests”.

7 Likes

Sadly, I don’t think your request will work since the proxy your using has rate limits on getting votes (every proxy has these rate limits except for roblox.com domains which we can’t use). They will more than likely have to set up their own proxy.

Edit: It works sometimes however its highly unreliable.

1 Like

That’s correct - it’s metaphorically gambling.

If you’d want to assure that you avoid traffic and strict rate limits, I’d recommend utilising ProxyService (a customised, user-generated module). There’s a tutorial on creating your own proxy (.herokuapp) and usability. Here’s a sample (you’d need your own proxy):

--[ Variables
local http = game:GetService("HttpService"); local ps = require(script.ProxyService)
local proxy = ps:New("yourHerokuWebsiteHere", "yourHerokuWebsiteKeyHere")
local api = "https://games.roblox.com"
local placeId = --your placeId
--[ Setup
local universeId = proxy:Get("https://api.roblox.com/universes/get-universe-containing-place?placeid="..placeId).body
universeId = universeId:gsub("[^%d%.%-]", "")
local get = proxy:Get(api.."/v1/games/votes?universeIds="..universeId).body
local data = http:JSONDecode(get)
print(data["data"][1])

as stated underneath, it’s better to use, however, only use it when appropriate. Don’t use it in loops frequently.

1 Like

Again this service has limits (higher limits but still I wouldn’t recommend putting it in any sort of loop)

The limits are as follows:

  • 550-1,000 dyno hours per month

However this is a better solution and nobody should be putting HttpRequests in short loops anyway because of Roblox HttpService limitations.

1 Like

lol yes u can with roblox lua just send http and api requests

It works. Sadly this proxy doesn’t work anymore. but you could use something like this:

local http = game:GetService(“HttpService”)

local placeId =

local universeId = http:GetAsync(“http://api.roproxy.com/universes/get-universe-containing-place?placeid=”…placeId)

universeId = universeId:gsub("[^%d%.%-]", “”)

local get = http:GetAsync(“http://games.roproxy.com/v1/games/votes?universeIds=”…universeId)

local data = http:JSONDecode(get)

print(data[“data”][1])

Tried your code since rpxry doesn’t work. Got 400: Bad Request.

local http = game:GetService("HttpService")

local placeId = game.PlaceId

local universeId = http:GetAsync("http://api.roproxy.com/universes/get-universe-containing-place?placeid= 6"..placeId)

universeId = universeId:gsub("[^%d%.%-]", "")

local get = http:GetAsync("http://games.roproxy.com/v1/games/votes?universeIds= 7"..universeId)

local data = http:JSONDecode(get)

local likes = data["data"][1]

warn(likes.." Likes!")

Hello there,

I have a Simple API Module that could help you.

It includes some Functions that connect to Roblox API’s to get Game Likes, Game Dislikes & Player Created Assets.

API Module

2 Likes