It depends on what you're trying to do.
If you want to simply get a single value (or array of values) from the query - then jobsAPI is the way to go.
If you want to get the actualy query results as a table, then the best approach would be to save the results as a file on a storage.