Catalog Search Module

Hey there all of you developers! Today I have decided to share with you a little something I have thrown together in the hopes you will find it useful.

Allow me to present to you my module that allows to make requests to the ROBLOX catalog.

The module currently only features one method, :Search()

:Search() takes 4 arguments, Query, Category, Page Number and Sort Type.

Query is a string, it is what you are looking for, as is the same for most search engines!

Category is an integer, it is the type of item you are looking for.
[li]1 is all items.[/li]
[li]2 is unknown currently.[/li]
[li]3 is all clothing.[/li]
[li]4 is all body parts.[/li]
[li]5 is all gear.[/li]
[li]6 is all models.[/li]
[li]7 is all plugins.[/li]
[li]8 is all decals.[/li]
[li]9 is all hats.[/li]
[li]10 is all faces.[/li]
[li]11 is all packages.[/li]
[li]12 is all shirts.[/li]
[li]13 is all t-shirts.[/li]
[li]14 is all pants.[/li]
[li]15 is all heads.[/li]
[li]16 is all audio.[/li]
Page Number is an Integer, it is fairly self explanatory.

Sort Type is an integer, it is the way the items are sorted.
[li]0 is relevance when not signed in.[/li]
[li]1 is most favorited.[/li]
[li]2 is best selling.[/li]
[li]3 is recently updated.[/li]
[li]4 is price low to high.[/li]
[li]5 is price high to low.[/li]
Returns a table of asset IDs
{135245, 356722, 629424, 135625}

None of the arguments are required, all integers default to one, with a blank search query. Here is some example code of how to use the module. This code will search for decals of the ROBLOX logo on page one that have been updated most recently.

local catalog = require(186812187)
local results = catalog:Search("Roblox logo", 8, 1, 3)
for i = 1, #results do
-- Do something

Please be aware this requires HttpService and also uses my own site to work, please be considerate when using it.

I see no reason for this to be closed-source :?

Can’t say I’m interested in using it if I can’t see what the code is doing. That code could literally be doing anything behind the curtains.

EDIT: It’s open-source now. Neato.

I have open sourced it, I apologize it was never my intention for it not to be open.

2 is all hats.
9 is all hats.

9 seems to be the right one. 2 returned gear and faces too. What is 2?

I like to use closed soruce, when it comes to publishing admin at our clan base, because people seem to like to mess with scripts xD

According to the wiki, this is the list of asset types:

It goes off of Catalog Asset Types, which is different, sorry.