The documentation[
^] suggests that the
main
property should exist. But you need to check that the code is
200
, not just that it's
anything other than 404 - you might be getting an error response.
Debug your code and inspect the
js
variable to see what is actually being returned. We can't do that for you, since we don't have access to your query or your API key, and nobody here is going to sign up to a commercial API just to test your code for you.