Passing data in nested Repeating Groups

I have 2 repeating groups A and B, B is nested in A. A calls an API and gets a list of items. B calls an API with “current cell’s A.id” to populate another list.
The issue I am facing is that when I want to have a button in B item, for it I need an ID from A and ID from B. However I only seem to have access to the data source of repeating group B, since the button is located here. How can I get ID’s of both items if I can only seem to get the source data of the parent only.

What if you search for repeating group A with its name ? It should be available from within B

The problem is list B has nothing that list A can be searched by. The ID I want is in the URL that A calls as data source and not in the body, and I don’t seem to have access to that URL

@dsaiko in the URL of the page? you mean neither “Get parameter from URL” and “This URL” are not available?

Repeating Group A has an external API as a source which returns a list. Repeating Group B has another external API as a source and also returns as a list, this API in B has query param which is based on which cell it is in A. So if there are 3 cells in A, second cell B calls with ID 2, and gives me a list.
I then want to have an action of passing data from this item in B as well as the ID (2) that was used to retrieve it.