You could probably do that with hooks by dynamically injecting the IDs into the dataset parameters, but that would be quite hacky and not really ideal.
A cleaner option would be to just make the API call inside the node itself  that way you can pass the list of IDs directly as an input and keep things simple and explicit.