When I make request to mapbox api
https://api.mapbox.com/geocoding/v5/mapbox.places/Los%20Angeles.json?access_token=YOUR_MAPBOX_ACCESS_TOKEN
I get the response like :
{"type":"FeatureCollection","query":[""]}
Then in the last of the reponse I get
"attribution":"NOTICE: \u00a9 2022 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service (https:\/\/www.mapbox.com\/about\/maps\/). This response and the information it contains may not be retained. POI(s) provided by Foursquare."}
So What I wanted to do is save the response to the db and then use it whenever it is needed because is more efficient then multiple request everytime.
Concluding what I want to know is it illegal to save the reponse data to database?
I am not a lawyer, but from the Terms and Conditions, it seems that no, you're not allowed to store their content. This is not surprising as for many APIs the pricing is based per request.
...
Our services
...
Unless stated otherwise below: You may not cache, store, or export any map content from the Services.
And:
Ownership
Your content
You retain ownership of all content that you contribute to the Services via Mapbox Studio, Mapbox Studio Classic, the Dataset API and the Uploads API, excluding any content that you receive from Mapbox ("Your Content").
(emphasis mine)
To be 100% sure you should contact a lawyer, try asking here, or simply contact Mapbox and ask them for a clarification.