I’m having trouble using field filtering with Airtable’s API when working in the iOS Shortcuts app. The basic record retrieval works fine when I use the maxRecords parameter like this:
https://api.airtable.com/v0/<DatabaseID>/<TableName>?maxRecords=5
But when I try to filter specific fields using the fields parameter, it throws an error:
https://api.airtable.com/v0/<DatabaseID>/<TableName>?fields=['Title']
This gives me an error response saying the parameter validation failed. I’ve checked the Airtable documentation multiple times but can’t seem to get the syntax right for field filtering in Shortcuts. Has anyone successfully filtered Airtable fields through the Shortcuts app?
had the same problem last week. the square brackets mess up shortcuts - they can’t handle that syntax. just encode your url right or ditch the brackets and use ?fields=Title&fields=Description for more fields. this fixed it for me every time.
The issue you’re encountering stems from the way you’re formatting the ‘fields’ parameter. Instead of using square brackets and quotes, you should list the fields directly. For example, your URL should look like this: https://api.airtable.com/v0//?fields=Title. If you need to include multiple fields, separate them with commas, like so: https://api.airtable.com/v0//?fields=Title,Description,Status. It can be tricky at first because Airtable’s documentation can vary in how it presents field formats, but for URL parameters specifically, avoid array notation and quotes unless the field names contain spaces or special characters. In those cases, ensure you properly URL encode those names.
URL encoding is key here. I hit this same issue and found that iOS Shortcuts handles URL parameters differently than regular web requests. It’s not just the brackets - Shortcuts interprets certain characters in its own way. Use percent encoding for field names, especially ones with spaces. So instead of fields=Title, go with the URL encoded version. Double-check your headers too, particularly the Authorization header with your API key. What helped me was testing the exact URL in a different HTTP client first - that way I could tell if it was my URL formatting or just how Shortcuts was processing it.