Well, unless you are using the IP address as some sort of identification, then it does not matter. Most API providers will expect a URI to come with the request, as the form of identification, but the request, in this case, comes from the user.
Yes. Depending on what you want to do, you can have the user request your server to make the API call, process the data (optional), and serve it to the user. This would be the recommended approach.
I did not phrase that very well. The best example of this would be:
- You have a website hosted by GitHub Pages
- It contains an html file and a jpg file
- The HTML uses the link to the jpg file hosted in the same location as your html script.
- The jpg is just as accessible as the html.
In this case, the jpg represents your data. So, replace that with a json file. Now, you need to manually update the json file in your repo, but the user never needs to make an API call to get the data, because they got it with the HTML (not entirely true…they got it with the HTTP request to the domain).
NOTE: Anything to do with someone else’s data, you should ensure there is no license issue with:
- Someone else using your URI to request the data
- You serving the data to someone else.
I hope that helps.