Added queryid fetcher

Script will now retrieve the queryid for the given party automatically.