If your WordPress address is different than your website address, you might face an issue with the API access. In that case, use wp-url parameter in your shortcode.
For example, if your WordPress address is : example.com/wordpress and your site address is example.com , you would add this in your shortcode:
[nearby-places location='your-location' wp-url="http://example.com/wordpress"]
Please remember to update this URL if you are developing on your local/staging environment and when launching the site.