You could use any type of query in source code - QB, SQL2, xpath. Make sure to make it more specific and fetch relevant data to optimize it.
sample SQL2 query to just fetch asset/folder names with url1. Based on your requirements, you could add metadata or other nodes..
SELECT * FROM [dam:Asset] as s WHERE (NAME() LIKE '%.jp%' or NAME() LIKE '%.png') and ISDESCENDANTNODE(s,'/content/dam/we-retail')