Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Some Way To Search For Models By Group?

Asked by
Benbebop 1049 Moderation Voter
3 years ago
Edited 3 years ago

Reposting after 96 hours of no answers, also new information

I want to search for all models created by a group. Google searches provide outdated or unanswered questions. Previously it seems the method to get group models was:

https://search.roblox.com/catalog/json?Category=6&CreatorId=9144340&IncludeNotForSale=true

Although this doesn't work anymore. (as seen here)

After 4 days of tinkering I found that

https://www.roblox.com/develop/library?CatalogContext=2&Category=6&CreatorId=9144340

Is successfully getting a groups models, just not my group, its searching some defunct group named "Super Wicked Army of Tacos" (as seen here). That's why I wasn't getting results.

I'm fairly certain the reason why its not returning my group is because of group agent IDs.

Quote from Catalog APIs
"Specifies the UserID to filter in the search, for example 1 for Roblox. If you'd like to find group-created items, enter the group agent's ID, not the group ID."

Everyone else seems as confused as me, there is no documentation for group agent IDs anywhere. Some people managed to figure out that if you view click on "View All Games" on a group homepage the URL will contain it, since the "View All Games" prompt was removed this no longer works.

I've tried searching through inspect element to figure out how Roblox gets the games for the group homepage (hopefully it can be applied for models) and no luck, probably because I have no idea what I'm doing when it comes to html. Inspect Elementing the Develop Group Creations page does give us this:

//*[@id="selectedGroupIdFromLink"]

Which seems like the right track, but yet again I have no idea what I'm doing so it seems like a dead end.

TLDR

I need to find the group agent ID of my group in order to search it for models.

Edit (Answer)

In the end, I use this code to get the agentId, not really good but it does the job for what I'm doing.

function module.getAgentId()
    local results = httpService:JSONDecode(httpService:RequestAsync({
        ["URL"] = "https://api.roblox.com/Marketplace/ProductInfo?assetId=" .. 6265421956,
        ["Method"] = "GET",
    }))
    if results.Creator.CreatorType == "Group" then
        return results.Creator.Id
    else
        return "invalid request"
    end
end

If you use this code, be sure to replace 6265421956 with the id of a product created by the group. (I used this one)

0
Well-formatted question! Ziffixture 6913 — 3y

1 answer

Log in to vote
1
Answered by
Ashedee 43
3 years ago

After Reading https://developer.roblox.com/en-us/articles/Catalog-API and researching online

Iron_Legion Roblox Staff

Jun '19

You shouldn’t need to know the agent ID to be able to fetch catalog items for a group. You can do this by adding “CreatorType=Group” to the query string. Then you can pass in the group ID as the CreatorID parameter.

From: https://devforum.roblox.com/t/api-endpoint-to-get-a-group-agent-id/284735

It looks like you would want to use a link like this one https://catalog.roblox.com/v1/search/items?CreatorID=9144340&CreatorType=Group

This is the results I received.

{"keyword":null,"elasticsearchDebugInfo":
{"elasticsearchQuery":null,
"isFromCache":false,
"indexName":null,
"isTerminatedEarly":false,
"isForceTerminationEnabledByRequest":false},
"previousPageCursor":null,
"nextPageCursor":"2_1_a44baca6f60667f1a09f18c7dc4ead35",

Looks like it is finding 10 items

"data":[{"id":192,"itemType":"Bundle"},
{"id":75,"itemType":"Bundle"},
{"id":8329679,"itemType":"Asset"},
{"id":1402432199,"itemType":"Asset"},
{"id":667,"itemType":"Bundle"},
{"id":43,"itemType":"Bundle"},
{"id":39,"itemType":"Bundle"},
{"id":8329686,"itemType":"Asset"},
{"id":16630147,"itemType":"Asset"},
{"id":495,"itemType":"Bundle"}]}
0
This doesnt seem to work, as far as I can tell its just returning random assets. The group is brand new so it should only have one asset, that being https://www.roblox.com/library/6237557241. Benbebop 1049 — 3y
1
I cant seem to get it to work through this api link either. look at this post by centraltrains: https://devforum.roblox.com/t/how-would-i-use-catalog-marketplace-api/563708/7 It seems to work and is using a different method. I hope this helps or points you in the right direction Ashedee 43 — 3y
0
After checking the post that you quoted, the original post's method of using the product info API works, now I have the Agent ID (and it works, as seen here: https://www.roblox.com/develop/library?CatalogContext=2&Category=6&CreatorId=2292266921). Though it still doesnt return anything, so we're not quite in the clear yet. Benbebop 1049 — 3y
0
You did answer my original question though, so I'll accept it. Benbebop 1049 — 3y
View all comments (4 more)
1
thanks, glad you found the id hope that helps. https://catalog.roblox.com/v1/search/items?Category=1&SortAggregation=5&CreatorID=2292266921&CreatorType=2&IncludeNotForSale=false this id gives the same result as I originally answered with. Ashedee 43 — 3y
0
Turns out all I had to do was remove "Catagory" and it works. Benbebop 1049 — 3y
1
Perfect. of course, coding drives me crazy for reasons like this. lol Ashedee 43 — 3y
Ad

Answer this question