How to get decals from toolbox through script?

Hey, I want to let users pick an image from a database of images, but it seems impractical to store thousands of id’s to try to anticipate every possible decal image a user might search for. Is there any way to directly get images from the roblox toolbar through a script, likely using HTTPS service to retrieve a list of associated items based on passed text?

I tried to ask chatgpt but it said it was “severely limited.” Im not sure how credible this information. I have also tried looking around but it seems like other solutions, such as finding tools based on text from the toolbox work. I’m not sure if it would work anymore and they might be outdated.

I would appreciate any help trying to retrieve decals based on text searches. Thanks

DISCLAIMER: This will require external API requests.

There is no Roblox Studio API for developers to retrieve assets by search query from Roblox web-services. However, an API does exist as the toolbox would not be able to function without one. We can do our best to find that API, or a kindred API, but this means making requests to Roblox from within Roblox Studio, which is disallowed. You will need to use a proxy web-service, or make your own…


After hopping over to the creator marketplace page, making a search query, and investigating the network calls, I found an API endpoint that will suit your needs. After further investigation, I was able to find official documentation for this endpoint in Roblox’s Open Cloud page.

I filtered out query parameters that may not be useful, and adjusted the rest for maximum download opportunity. The following is your desired API endpoint:

"https://apis.roblox.com/toolbox-service/v1/marketplace/13?limit=100&keyword=%s&includeOnlyVerifiedCreators=true"

The key part of this endpoint is the “keyword” query parameter. This is what you’ll use to turn up decals related to the given keyword. I modified the URL to use a string pattern at that query parameter, so you need only use string.format to insert the user’s search query.

This endpoint only provides you with the asset IDs of the decals though. I recommend collecting them, then making a series of threaded calls to MarketplaceService:GetProductInfo to retrieve the images

I really appreciate your detailed and thoughtful response. You mentioned that I will need my own proxy web-service but I’m not entirely sure what to use. I don’t know much about proxy web-services but I have used them in the past for my famous furry detector 2.0.

It seems like the RoProxy web-server is still up. You can simply replace second-level domain in the URL (“roblox”) with “roproxy”, and the request should operate like normal. Do note that your game will become dependent on a 3rd party web-server that could become compromised or experience downtime

Heres the script I made. thanks for ur help!

local HttpService = game:GetService("HttpService")
local MarketplaceService = game:GetService("MarketplaceService")

local SEARCH_URL = "https://apis.roproxy.com/toolbox-service/v1/marketplace/13?limit=100&keyword=%s&includeOnlyVerifiedCreators=true"
local IMAGE_URL_TEMPLATE = "https://www.roblox.com/asset-thumbnail/image?assetId=%d&width=420&height=420&format=png"

local function searchDecals(query)
    local url = string.format(SEARCH_URL, HttpService:UrlEncode(query))
    local success, response = pcall(HttpService.GetAsync, HttpService, url)
    
    if not success then
        warn("Failed to retrieve decals:", response)
        return {}
    end

    local data = HttpService:JSONDecode(response)
    if not data or not data.data then
        warn("Invalid response structure")
        return {}
    end

    local decals = {}
    for _, asset in ipairs(data.data) do
        table.insert(decals, {
            id = asset.id,
            name = asset.name or "Unknown",
            imageUrl = string.format(IMAGE_URL_TEMPLATE, asset.id)
        })
    end

    return decals
end

-- Example usage
local results = searchDecals("dog")
for _, decal in ipairs(results) do
    print(string.format("ID: %d | Name: %s | Image: %s", decal.id, decal.name, decal.imageUrl))
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.