How to search all records in a json format database

Viewed 23

"I have been trying to make a query through this API, and I want to pull all records rather than just ones starting with "Kevin".

I tried taking out the query param, or leaving it blank and it gives a "missing param error". I tried using an * wildcard and that gave me a "bad query error". " This part is solved ->

the API uses Lucene query syntax but I can't find anything that suits my need. I'm doing it in Postman as well.

Bullhorn API on postman

Edit: I was able to pull all records, but now its only showing me 20 ("count": 20, line 4) of the 119,044. How can i get all records? Also i am using the bullhorn REST API, here is the documentation: https://bullhorn.github.io/rest-api-docs/index.html#put-savedsearchfavorite

Thank you all!

1 Answers

How to request "all data"?

You can try a Lucene classic query parser regular expression search:

/.*/

The dot . means "any single character".

The asterisk * means "repeat the previous character zero, one or many times".


How to get more than the first 20 records?

You can repeatedly make your API call, retrieving one page of results at a time. Look at count and start in the options section of the documentation.

count - Limit on the number of entities to return. If the set of matched results is larger than count, caps the returned results at size count. The default count is 20. The maximum count is 300; if you specify a count greater than 300, a message at the end of the response indicates you have specified too many items.

start - From the set of matched results, return item numbers start through (start + count).

You can get a maximum of 300 results at a time, using count=300 and then you can get the "next 300 records" (the next page) using start - for example, start=301 to get the second page of results.

You would need to write a script of some kind to generate each new call with the next value of start you need to use.

Warning

Don't be surprised if your attempt to fetch the entire data set of 120,000 records causes your account to be locked due to exceeding your allowed quota. I don't know if this API has this feature, but it's not uncommon for public APIs to limit how much data you can extract, within a given period of time.

Related