Feature/api queries stars

This duplicates what roughly what you have in lls 20 - 23

wouldn't it make sense to move it into a method?