a server side API will not reduce server load compared to this. The same internal functions will be executed on the server, regardless of how the client connects to the server. The same amount of data will be transferred between client and server (except for the initial connection from jdcapi).
This simply is not true. Typical API sends JSON to the client, which is incomparable to the complete HTML + CSS + JavaScript which are sent in this case. JSON is highly optimized without the bloat of the presentation layer. Added to that, there are usually several interfaces in the average API, so the only desired subset of data is sent to the client, not the whole unnecessary site.
Don't get me wrong, but my fear is that if we start calling this an API we would never ever get the proper one from dooglus.
did you even go through the code properly? ONLY the initial connection gets css and html, this initial connection is required to get the connection headers and cookies, and if the cloudflare protection is up, to get past that. EVERYTHING else is in json
I don't want to start (continue?) a flame war on this thread. So I'm not going to argue my point any further. I'm sure if Dooglus isn't happy with jdcapi he will still release his official api.
Edit: if you have a way to get those headers and cookies without pulling the site data with it, I'm open to suggestions. Improvement on my code is why I uploaded it to github in the first place. Feel free to PM me here with your suggestion, or on github, or whatever floats your boat