stefangrotz / OpenDataGermanyGPT

A ChatGPT GPT that can acces open data portals using the CKAN API and SPARQL for Germany, Switzerland and Austria
https://chat.openai.com/g/g-uiJQsroGg-open-data-portals-germany
MIT License
61 stars 8 forks source link

Avoid reponse error with CKAN filter methods #1

Open tifa365 opened 7 months ago

tifa365 commented 7 months ago

Couple of examples, not sure all of these work, though:

Limit Query Parameter: https://www.govdata.de/ckan/api/3/action/package_list?limit=10

Offset for Pagination: https://www.govdata.de/ckan/api/3/action/package_list?limit=10&offset=20

Page Parameter: https://www.govdata.de/ckan/api/3/action/package_list?page=2&limit=10

Custom Range: https://www.govdata.de/ckan/api/3/action/package_list?start=10&end=20

Date or Time-Based Filtering: https://www.govdata.de/ckan/api/3/action/package_list?since=2023-01-01

Sorting and Limiting: https://www.govdata.de/ckan/api/3/action/package_list?sort_by=date&order=desc&limit=10

Cursor-Based Pagination: https://www.govdata.de/ckan/api/3/action/package_list?cursor=abc123&limit=10

Batch Requests: https://www.govdata.de/ckan/api/3/action/package_list?batch=5

Field-Specific Limits: https://www.govdata.de/ckan/api/3/action/package_list?category=health&limit=10

Combining Filters: https://www.govdata.de/ckan/api/3/action/package_list?type=dataset&status=active&limit=5

stefangrotz commented 7 months ago

Thanks, limit and offset works fine. I updated https://github.com/stefangrotz/OpenDataGermanyGPT/blob/main/actions/govdata-ckan.json

I will also update the Instructions to improve the handling of these parameters.