An api is the programming interface to an application
Generally a rest api would return data in json format but it doesn’t have to
The api would define more things like url, authentication, http method, query parameters in the url and what they mean or data to send to the api endpoint and probably more