Is there an API for getting data from reference?

Hi, I’m doing a Discord bot that parses the MDN website to get the reference directly in Discord, but it’s slow and hard to make, isn’t there an API to get the data without parsing the website ?

I know that there is one when we search something in the website (add .json to the link).

Hi @Ayfri!

Can you explain in slghtly more detail what you are trying to do? When I’m trying to extract some page information from MDN, I always make use of:

Thanks for your reply, the $json was what I was trying to do (but with .json, little mistake).

But it doesn’t retrieves the informations I am looking for, I want to get all the methods, their descriptions etc, the examples, the full description of an object.
(I forgot to say that I want only informations from JavaScript Reference)

Is there a way without parsing the website to get these informations ?

Ah, I understand what you want to do now. No, I’m afraid there is no way of doing this right now — you’d have to scape the page and extract the information from the HTML, which I appreciate can be rather painful to do.

We are currently working on migrating our content to structured data on GitHub, which would make such a use case much easier to realize.

Okay thanks I’ll do this for the moment, thanks for help !