[ROBLOX API] No 'Access-Control-Allow-Origin' header is present on the requested resource

I have been messing around with ROBLOX APIs because I was bored and had nothing to do
And I stumbled upon this: External Catalog Queries | Documentation - Roblox Creator Hub


I decided to read through the docs and wrote a script that returns newly updated models.

fetch('https://search.roblox.com/catalog/json?Category=6&SortType=3&ResultsPerPage=50&SortType=3', {
    method: 'GET',
})
    .then(response => response.json())
    .then(func => console.log(response))

The code works without &SortType=3, but with it, it returns an error:


Access to fetch at 'https://www.roblox.com/request-error?id=9dd9979b-9732-4aba-b6e6-7af89da1b727&mode=&code=&isWebsite=true' (redirected from 'https://search.roblox.com/catalog/json?Category=6&SortType=3&ResultsPerPage=50&SortType=3') from origin 'https://www.roblox.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.


I don’t know how to solve this issue, any help would be appreciated! :DD


Once again, keep in mind that I’m doing this for educational purposes

2 Likes

this is cors, your title means basicly that roblox does not accept browser requests, and if you didnt know 400 bad request basicly means, something went wrong you can fix, i do not know anything beyond that of the roblox api,

edit: upon closer inspection of your url in the fetch sorttype is seen twice

2 Likes

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