How can I use javascript to send an api request

How can I send an api request with js, and what url should I use?

JavaScript isn’t usable on Roblox. I think you’re going to have to explain your use case and scenario a whole lot more than just one sentence, or look to another platform for web development help. The answers depend on what you want to do and you haven’t provided any context.

I think you’re talking about HTTP service not JavaScript.

If you’re asking about the Roblox Web APIs, like catalog.roblox.com, then refer to the /docs path of each domain (ex. https://catalog.roblox.com/docs).

As for how to send a request, use Axios or something similar.

const axios = require('axios');
console.log(axios({
    url: 'URL',
    method: 'GET'
})); // Might print [object Promise], in that case just await the HTTP request
2 Likes

Not sure if you can do this with JS but you can look into ro.py, I believe you can send API requests with this.

1 Like

I used the following articles to do exactly this to be able to search the Library API for songs in Poop Simulator, using an external proxy hosted on Google servers for free (up to 10K daily hits):