You can set up an export and use WP_Query to fetch the data: https://www.wpallimport.com/documentation/wp-query-export-to-csv/, but you can't change the query for an existing export.