Once again, it depends on what you want to achieve. For the sake of simplicity, I will use RoProxy, the proxy I provided earlier (https://roproxy.com). For example, we’ll say you want to get how many favourites a game has.
I’ll take you step by step.
Firstly, you’ll need to enable HttpService. This can be done from the Game Settings panel if published or by running this in the command bar.
game:GetService("HttpService").HttpEnabled = true
Now that HttpService is enabled, we’ll create a server script and define HttpService.
local HttpService = game:GetService("HttpService")
We’ll take a look at the game API documentation (https://games.roblox.com/api), and we’ll switch from V2 to V1 so we can see the endpoint we need. From this documentation, we can see that there are a few ways we can get the favourite count of a game. For this demonstration, we’ll use the /v1/games/{universeId}/favorites/count endpoint (Found Here).
From this endpoint documentation, we can see that it is a GET request and takes a path parameter within the URL (universeId).
local HttpService = game:GetService("HttpService")
local favorites = HttpService:GetAsync("https://games.roproxy.com/v1/games/123456/favorites/count")
We’ll use :GetAsync() to make a GET request to our favourites endpoint. Swap “123456” with the Universe Id you want to get data from. Once again, we use roproxy.com in place of roblox.com within the URL, as a proxy.
Keep in mind: This is a Universe ID, NOT a Place ID.
Now that we’ve sent our get request, we can use our data retrieved from the endpoint. For the sake of demonstration, we’ll print the favourites count.
local HttpService = game:GetService("HttpService")
local favorites = HttpService:GetAsync("https://games.roproxy.com/v1/games/123456/favorites/count")
print(favorites)
Let’s see what outputs from this. It printed {“favoritesCount”:1} in our output. Hooray! We’ve gotten the favourites, but we aren’t done yet.
Let’s actually go to use this data. We’ll print out the actual favourites count itself.
local HttpService = game:GetService("HttpService")
local favorites = HttpService:GetAsync("https://games.roproxy.com/v1/games/123456/favorites/count")
print(favorites.favoritesCount)
Let’s see what happens here. It outputs nil. 
Why?
The response provided from the API is JSON data. In order for us to actually use this data, we need to decode it to a format that we can use. Thankfully, we can just use JSONDecode through HttpService. Let’s just set our favourites variable to be the table we receive from decoding it and print the count.
local HttpService = game:GetService("HttpService")
local favorites = HttpService:GetAsync("https://games.roproxy.com/v1/games/123456/favorites/count")
favorites = HttpService:JSONDecode(favorites)
print(favorites.favoritesCount)
We now get the favourites count in a format we can use.
| Congratulations! You’ve just used a Roblox API endpoint to get the favourites of a Game.
There are so many other possibilities with API endpoints, and I encourage you to continue to explore them. Obviously, this is still an example in all and you can adapt it however you’d like to achieve whatever you’re looking to do with it.
References:
Games API - https://games.roblox.com/docs
HttpService Documentation - HttpService
RoProxy - https://roproxy.com (proxy used in this demo)
Keep on exploring,
Ovadux