An array of 1000 words does not take up much space. Let's count.
Suppose you encode UTF-8 text and your words are Russian.
To encode a single letter from Cyrillic requires 2 bytes, suppose you have an average word length of 10 characters, therefore you need 20 bytes for one word. You will need approximately 20,000 bytes or 19.5 KB for an array of 1000 words.
You can not make a request to another resource directly through AJAX and parse the meaning of the word from this resource, the browser policy prohibits directly making any requests for third-party resources. You can try to find a resource that supports and allows you to do this via JSONP or CORS, but you will probably find it easier to have a copy of such a database, because I did not find such resources with these permissions.
It is more logical that the server script be on the server side and produce a random word, but the server script can connect anywhere and receive data from anywhere, but this does not suit you, you just have to embed the JS on the page, without the possibility of the server part on this same domain.