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.
I need to find the group agent ID of my group in order to search it for models.
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)
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"}]}