Get players Roblox account description

There is no API to get a user’s account description from a username as far as I am aware. You could use some external source and try to extract the information from the web page, but I’m not really sure if this would be easy.

Here’s a list of the API’s.

3 Likes

If that isn’t possible then is there an API that returns UserId from username?

1 Like

I assume this is what you want.

https://developer.roblox.com/en-us/api-reference/function/Players/GetUserIdFromNameAsync

I don’t want this for my ROBLOX game.

This documentation here has all the endpoints:

I can’t see anything, but if you can spot something I can’t, let me know.

Absolutely. Here is the main API for that:

http://api.roblox.com/docs#Users

(it’s the second one in the list)

In PHP, you can send a cURL request to the user’s profile (https://www.roblox.com/user.aspx?username=) and scrape their blurb. However, I’d definitely recommend learning Node.js

Have a look at this article: https://davidwalsh.name/php-notifications

1 Like

I have made my own API for getting Blurbs, jsut via endpoint, I will send you it via DM

2 Likes

I do know node.js as well but I chose php for this project.

1 Like

The library used in the linked article is one I used in a college project that scraped web pages for product allergy information. It’s excellent, but in hindsight, I wish I’d used Node, rather than PHP for the app

1 Like

I usually use Node wen I want to make my own endpoints.

If you’re really leaning toward scraping the website, try this:

(I realise it’s Node.js, but I can’t find any alternatives. Maybe use the algorithm and change it to PHP?)

1 Like

Ok, I’ve done some simple digging around, and I have some information for you that will hopefully help you in your web scraping efforts.

  • The CSS class for the bio is ”profile-about-content-text linkify” The profile is a span element. I can’t find anything else on the page with those exact criteria. Maybe search for that to get the text?

  • A bulky amount of the page source is JavaScript, which is useless to us. You can remove the entire head section of the page, and all script tags.

  • The page uses Angular, so you’re going to come across a load of ”ng-???” stuff here and there.

1 Like

Don’t copy and paste this – it’s been several years since I’ve used PHP, but you’d probably be looking along the lines of this:

include('simple_html_dom.php');

$userId = $_GET['userId'];
$code = 'HELLO_WORLD';

$html = file_get_html('https://www.roblox.com/users/$userId/profile');

$blurb = $html->find('span.profile-about-content-text')->innertext;

echo (strpos($blurb, $code) !== false) ? 'Code found!' : 'Please add $code to your profile!';
3 Likes

With my PHP knowledge and with your code I think I can do it I appreciate the help.

I will update you.

I wasn’t doing this in Roblox.

Hello @hmmbilly

Are you able to send me it via DM?

  1. This is a really old topic
  2. The user is suspended
1 Like

In case anyone is still wondering on how to do this, you can use the following endpoint to fetch information about the profile:

https://users.roblox.com/v1/users/{userid}

In order to get the ID from the username, request to this endpoint:

https://api.roblox.com/users/get-by-username?username={username}

Replace both the {userid} and the {username} fields by their user id and username respectively.

Hope this helps!

Note: You can also check out https://users.roblox.com/docs for more endpoints in case you need them

1 Like
local http = game:GetService("HttpService")
local get = http.GetAsync
local jsonDecode = http.JSONDecode

local proxyUrl = "roproxy.com" --Put your proxy's domain here.
local baseUrl = "https://users."..proxyUrl.."/v1/users/%d"

local function getUsersDescription(userId : number)
	local requestUrl = string.format(baseUrl, userId)
	local success, result = pcall(get, http, requestUrl)
	if success then
		if result then
			local success2, result2 = pcall(jsonDecode, http, result)
			if success2 then
				if result2 then
					return result2.description
				end
			else
				warn(result2)
			end
		end
	else
		warn(result)
	end
end

local userDescription = getUsersDescription(1)
print(userDescription) --Welcome to the Roblox profile! This is where you can check out the newest items in the catalog, and get a jumpstart on exploring and building on our Imagination Platform. If you want news on updates to the Roblox platform, or great new experiences to play with friends, check out blog.roblox.com. Please note, this is an automated account. If you need to reach Roblox for any customer service needs find help at www.roblox.com/help
2 Likes