Why I'm having API response always null?

I am new here, and I need!
I am working on my first bubble app for a travel company solving the groups quote…
I am using a few APIs in this app, all of them work just as expected, but the one for the flight search I couldn’t get it to work! I always get “null” as a response. The requested goes with no problem to the server.
This same API works fine at all the browsers and at Postman without any issues.
Also it works good in Bubble API plugin but within the application I’m building I only get empty repeating group no matter what I do…
So, I’m not sure what I’m missing here?
Any help to solve this problem… I will really appreciate it.
here is some snapshot!


This is the response at Bubble connector API:

Also when I use the API URL + Params + API key I get the following results:

So I’m sure the API, key and the params are all working fine, so within my application I did the following:
I started setting up the group first as I did with my previous APIs;

I did the repeating Group as follow:

And for displaying API response data on the repeating group I did the following:

So similar sitting for the other APIs I’m still using in this app… but this is what I’m getting as a response even though all the requests show response status; 200 I still get empty response:

I’ve tried different things but the results are always the same.
I’m not sure what I’m doing wrong.
Any help on this is really appreciate it…
Thank you.

Also I forgot to submit the snapshot of the API response data as an example:

Based on a quick look, it looks like you defined the data source on the parent group first and then displayed the results in the repeating group.

Try setting your data source to return results in the repeating group itself. (Ie. what you have as the Data Source on “Group Flight Results” move to “RepeatingGroup Getting_Flights…”

Thank you Dan for your quick response.
Ok I will try it right now…
Thank you again

I just did what you’ve told me:


but still showing no results!!! it must be something else that I’m still doing wrong…

Provided you’re comfortable doing so, mind sharing a link to your app in a private message? Happy to take a look from there.

Sure! Thank you.
Here is the link:

Spent a bit of time poking around. I think it has to do with the setup of the API.

I tried experimenting with a few different approaches. (Ie. one way, with infants, etc). You’re definitely getting responses from the API. But it likely needs other parameters that you’re not sending. (Ie. return date, infants). Try experimenting with making certain fields optional.

Though it looks like there may be two different search APIs based on the duration of the trip.

This was the common error I saw. You likely need to experiment with making some fields optional (if they can be optional - or sending a default value.

Raw error from Flights_API - Getting_Flights: {"status":400,"message":"An ISO date or date range indicating the date on which the traveler will depart from the origin to go to the destination. Format should be YYYY-MM-DD[--YYYY-MM-DD]. The maximum scope for a date range is 2 days, for a larger scope, use the Extensive Search! Example: 2015-07-06--2014-07-07 or 2015-09-01."}

Thank you Dan for your help and your time.
Yes, I did play with all the fields as you said also I put some of them “optional” on the API connector, but without results.
The only date required is the departure date, so when I only use the departure date I get no error popup message witch’s fine, but even with that I couldn’t get the results.
The strange thing is: It works perfect on the browsers, in Postman and in API connector even with only the required field as Flying from data, flying to data and Departure date… but not in the app as you already saw for your self.
It doesn’t make any sens…
But thank you anyways Dan.

Finally! I’ve got it to work…!
I’ve changed the date format and it works…
Thank you Dan for your help.

Good to hear. What formatting of the date formats made things work correctly?

I used this format: yyyy-mm-dd
and it works great!.

1 Like