# API HELP? How do I make my API calls run in parallel rather than sequentially?

**URL:** <https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004>\
**Category:** APIs\
**Created:** [July 11, 2023, 2:37pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004 "2023-07-11T14:37:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![EliteDataEngineer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/elitedataengineer/32/172726_2.png) [@EliteDataEngineer](https://forum.bubble.io/u/EliteDataEngineer)\
**Post date:** [July 11, 2023, 2:37pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/1 "2023-07-11T14:37:51Z")

</div>

**I have the below workflow:**

 ![wf](https://us1.discourse-cdn.com/bubble/original/3X/f/6/f6b24fe57347ed5e5c6fe2b5c0ca345c7c15b636.png)

* * *

However, the APIs load on the page sequentially because bubble runs each action after the prior has finished, which causes this:

 ![dt](https://us1.discourse-cdn.com/bubble/original/3X/6/4/647dc6135edefb3eabe0b8c1a7786255dacf2356.png)

I need all 4 to run at the same time so that the entire page loads in 1 second rather than 4 seconds.

Is there a way to do this?

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [July 11, 2023, 4:07pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/2 "2023-07-11T16:07:50Z")

</div>

Hi @EliteDataEngineer 👋

I will give a shot in the dark here…

If your workflow actions don’t depend from each other, then create 4 workflows events for “When popup is opened” instead of only one. It may be that this activates them all at once.

---

<div class="post-metadata">

**Author:** ![EliteDataEngineer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/elitedataengineer/32/172726_2.png) [@EliteDataEngineer](https://forum.bubble.io/u/EliteDataEngineer)\
**Post date:** [July 11, 2023, 4:27pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/3 "2023-07-11T16:27:43Z")

</div>

Didn’t work. Still lined up like a row of ducks 🦆 🦆 🦆 🦆

@rpetribu @Jici

---

<div class="post-metadata">

**Author:** ![rpetribu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/rpetribu/32/90852_2.png) [@rpetribu](https://forum.bubble.io/u/rpetribu)\
**Post date:** [July 11, 2023, 4:35pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/4 "2023-07-11T16:35:11Z")

</div>

Don’t have any other idea 😅  
Maybe @Jici could give a try.

Just asking… but why you need to wait for your popup to open to load the list in the repeating groups? 🤔 Can’t you load them before? This may speed up the process…

---

<div class="post-metadata">

**Author:** ![EliteDataEngineer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/elitedataengineer/32/172726_2.png) [@EliteDataEngineer](https://forum.bubble.io/u/EliteDataEngineer)\
**Post date:** [July 12, 2023, 8:27pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/5 "2023-07-12T20:27:29Z")

</div>

@rpetribu Because the data on the popup is dependent on the RG row the user selects (each row is a business name and each popup is the detailed business profile)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [July 12, 2023, 8:46pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/6 "2023-07-12T20:46:20Z")

</div>

Your list on RG should probably be based on the Parent Popup data. You shouldn’t need to use display list in RG because the Data source should be based on the popup data. When this is updated, Bubble will also update the result of the RG. I don’t know it will fix the sequentials run, but it may faster the whole process.

---

<div class="post-metadata">

**Author:** ![EliteDataEngineer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/elitedataengineer/32/172726_2.png) [@EliteDataEngineer](https://forum.bubble.io/u/EliteDataEngineer)\
**Post date:** [July 12, 2023, 9:04pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/7 "2023-07-12T21:04:54Z")

</div>

@Jici Display lists are necessary for popups that use API data.

This is because bubble only calls APIs on popups just once in total, meaning that if you close the popup of business #1, its data will show for business #2.

This is a known caching issue whose [only current workaround](http://forum.bubble.io/t/finally-my-api-data-refreshes-without-page-reload-how-i-got-it-to-work/41129/2) is the use of display list.

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [July 12, 2023, 9:38pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/8 "2023-07-12T21:38:02Z")

</div>

@EliteDataEngineer This apply to all API Call (not just in Popup) only if there’s no modification in your API Call. If you change your popup and the RG call is base on the Current popup data, this mean that the call should be different and Bubble will request it again.  
So what do you push to your popup as display data is involved I guess in your API Call and because of that, The RG will update itself from the popup data source update (only if this is used in your API Call…)

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [July 12, 2023, 9:47pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/9 "2023-07-12T21:47:38Z")

</div>

I’ve made a test and can confirm that in this case, the RG will load parallel and not sequential. (Made a test where I have a first API Call that is used into 2 different RG group call and theses two load parallel after the first one is done)

 ![Capture d’écran 2023-07-12 174719](https://us1.discourse-cdn.com/bubble/original/3X/6/e/6ec271bf2a11ad2852ddd2a7c9b19e2e573f5c67.png)

---

<div class="post-metadata">

**Author:** ![EliteDataEngineer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/elitedataengineer/32/172726_2.png) [@EliteDataEngineer](https://forum.bubble.io/u/EliteDataEngineer)\
**Post date:** [July 12, 2023, 10:52pm UTC](https://forum.bubble.io/t/api-help-how-do-i-make-my-api-calls-run-in-parallel-rather-than-sequentially/272004/10 "2023-07-12T22:52:38Z")

</div>

@Jici Your suggestion pointed me in the right direction by making me revisit _‘Data Source’_ as an option instead of _‘Display Lists’_.

![Screenshot 2023-07-12 at 23.45.56](https://us1.discourse-cdn.com/bubble/original/3X/8/6/866619afe856bfb1d8876be2cc38fb69f493d866.png)

My API requires the current datetime as a parameter, which bubble wasn’t refreshing on the popups. I therefore ended up setting the datetime as a custom state which allowed me to go back to using data source, which now gets the calls being made in parallels!

Thanks
