Best way to pass a list of record IDs to an API – objects vs text IDs?

Hi everyone,

I’m working on an API in Bubble that needs to receive a list of record IDs. I’ve been testing two different approaches, but I’m not sure which one is the best practice in terms of performance:

  1. Send the list of IDs as text, as an array in JSON, then do a search in Bubble with an IN filter on the unique IDs.

  2. Send the list as a list of objects, as an array in JSON, but in my API in Bubble instead of expecting a list of texts I changed to expected a list of objects (data type). I noticed that if I pass IDs, Bubble automatically translates them into objects. What I don’t know is whether Bubble fetches them with one single query or does one query per ID behind the scenes.

My questions:

  • Which approach is generally better for performance?

  • Does Bubble handle option #2 efficiently (batch query), or could it become slow with large lists?

I’d love to hear how others are handling this in their apps, especially if you’ve run into performance bottlenecks or scalability issues. My list could contain up to 500 IDs.

Thank you!

Bubble is likely doing the query the same way in both instances.