How to structure WordPress plugin to display data from API

I am creating a plugin that connects to a remote API that has car listings and displays the data that’s returned in that call.

The plugin essentially does not need to interact with the WordPress database at all.

I already know I can use things like wp_remote_get, file_get_contents and file_get_contents to retrieve that data.

My problem is that I’m not sure if I should be creating a plugin for this or just shortcodes or page-templates or what.

I want the urls to look like: //Cars listing results //Page 2 of Cars listing results //Search parameters for Cars listing results //Car info page 1234 is the car_id

I was thinking I could create pages in WordPress called cars and car and then create custom shortcodes that would hook into some functions I build to interact with the API, but for some reason that doesn’t seem like the best idea to me.

Can anyone recommend a better structure for setting this up?

PHP code can be written in a template, functions.php file, or a plugin and have the same result.

Here are the advantages/purpose of each method:

Template file:
Templates should be used to display information and not perform operations. It makes them easy to read.
It is fairly common for WordPress files to use “if” statements to switch content in templates, but it should be kept to a minimum as it becomes difficult to read.

This file stores theme settings like custom post types, enqueuing styles, etc… Its OK to write a few short functions to parse content, but lengthy code clutters it up.
Additional pages of code can be added to a theme.

Plugins are a good place to write long pieces of functionality. It separates them and makes them portable. You can add them to other sites.