Ask coding questions

← Back to all posts
Finding projects on repl.it
Coder100 (177)

I have a folder, and I would like to access every project's data such as project name and project URL inside the folder using some sort of API. So it would be like a GET request and the header looks like {projects:[{'[project name]',...},{...},...]} Is there a way to do this? I prefer something like node.js if possible. Thank you!

Commentshotnewtop
eankeen (768)

There isn't a documented API to facilitate this, unfortunately. If you know graphQL, there is a graphQL endpoint located at /graphql that should give you the data you are looking for. It's not documented though, and it's subject to change without any notice.

Maybe consider performing a GET request to https://repl.it/@<USERNAME> and parsing the HTML for the project titles or links.

Coder100 (177)

@Coder100 how would I perform the GET request?

eankeen (768)

@Coder100 So if you're using JavaScript, you can use a library called 'Axios'. Alternatively, you can use fetch. If you want to use fetch on node, you're going to have to install the package node-fetch.

JustARatherRidi (191)

Sorry, but I'm pretty sure there's no way to do anything like that yet :/

As a side note, what exactly do you mean by 'accessing' projects via an api?

Coder100 (177)

@JustARatherRidi I mean like by finding project name and project url

JustARatherRidi (191)

@Coder100 Oh okay, although there isn't an api for that, you might just be able to go the folder and scrape all the names of the repls and the corresponding urls.

What do you plan on doing with the names and urls?

Coder100 (177)

@JustARatherRidi It would show up on a website and update whenever I make a new project in that folder.