I think upgrading the RAM as you mentioned is going to make a big difference. While the physical RAM might be soldered to the motherboard, you could buy a fairly cheap SD card or USB and set the system up to use that as virtual memory. It won’t be as fast as actual RAM but it might help and large SD cards are honestly really cheap these days.
I haven’t seen anyone mention it yet, but a reason might be that providing an API is cheaper than web scraping.
If people really want access to your data, they can just scrape your website, but that requires loading all the data through the website itself which requires loading millions or billions of video thumbnails, comments, descriptions, recommendations, etc. It’s much cheaper for them to send a JSON through an API, even though they might know that some people are trying to undermine them by using that data to circumvent their advertising.