With an API, we can fetch fresh data from a server. If your dataset never changes, then a static dataset may work. Also, an application using an API can fetch the data on different systems. If you application relays on a static local dataset, you should ensure that dataset is always available.