Best way to find record with unique id from 3rd party API

What’s the best way to get a database entry if all you have is the unique id?

For example, if ask an AI API to pick an unique id from a list of data from my app that I supply in a prompt, each with a unique id, and I have the AI to respond with a unique id based on certain parameters.

What is the most efficient/performance optimised way to get back the correct entry in my Bubble database?

Is it Do a Search for and match the unique ids? But it seems a waste to do a search when I already have the exact id for the entry I want.

Yep this is the best way.
Search for Thing:first item constraint unique id = [unique id]