In cases like this, your only option is to make a lot of separate API calls. To avoid the API request limit, you can use a rate limiter. For example, I sometimes use the throttled-request package with Node.js.
Remember that the rate limit applies at the organization level. If you have any other integrations or tasks using the API, you need to consider the total usage.
Using the first two letters of the model to determine the device type seems good enough for now.