Using a Third-Party API to dynamically create pages
You have a few options here, though without knowing the API your using, it's hard to nail down exactly what one you would need.

If it's a commonly used service, there might already be a module that exists for it. As a general rule, if there is a module already created to handle it, that should be the way to go.

You might be able to go slightly out of the box if your API spits out some form of feed and use a module to import that feed (it's a bit older, but as an example, feeds does this.) There's a few other ingestion modules out there that might work for you.

Creating your own custom module is, of course, always an option. I know I've written a few import modules, but I normally only do that when the other options are not viable.