0

I'm playing around with the data.gov API and was trying to reconstruct a API request from the websearch. ex: COVID-19 datasets filtered by Texas my url looks like

https://catalog.data.gov/dataset?q=COVID-19++&sort=views_recent+desc&as_sfid=AAAAAAVj354uPLWh4A-rtCGREQUj1meuoN7meraqiIpM0fYfGGWoEaGfEPqUjArih-22d-oaV26Dhfu_Id9XjdmN1nx2RQRL_KrLPw3K57Fv7P5zT9Z0HR3-ShUHdp8UvZdqXuM%3D&as_fid=8563fb05fbeea54c88ab1649dfdc5c5933f46436&ext_location=Texas&ext_bbox=-106.6501%2C25.8456%2C-93.5074%2C36.4939&ext_prev_extent=-110.390625%2C22.43134015636061%2C-89.82421875%2C37.579412513438385

and yields 36 results

But when I use just the q and ext_location parameters in the following request get a much higher result.

https://catalog.data.gov/api/3/action/package_search?q=COVID-19&ext_location=Texas

I understand that ext_bbox and ext_prev_extent are related to the spatial search and adding them to my requests gives me my expected results.

My question is how do I find the parameters that are accepted in package_search API ? (The CKAN documentation does not go into details here)

TLDR; How does one identify parameters that are accepted in an API request

1 Answer 1

1

if you can read code, PHP code, there a client API

more precisely in:https://github.com/GSA/ckan-php-client/blob/7602dec864c25cfe5f3f96910cdaa8620ea6d57d/src/CKAN/CkanClient.php#L510

You should see here too:

By experimentation I found these parameters: https://catalog.data.gov/dataset?tags=cases &groups= &res_format= &ext_prev_extent= &ext_bbox= &q= &organization= &sort= &ext_location= &publisher= &bureauCode= &as_sfid= &as_fid=

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.