How to filter Airtable records through API endpoint with formula parameter

I’m trying to retrieve specific records from my Airtable base by using the filterByFormula parameter in the API URL. However, I keep getting an invalid formula error and can’t figure out what’s wrong with my syntax.

Here’s the API endpoint I’m using:

api.airtable.com/v0/BASE_ID/Products?filterByFormula=(FIND("Smart watch will notify me when I need to take a break",{Customer feedback}) &api_key=MY_API_KEY

The error response I receive:

{
    "error": {
        "type": "INVALID_FILTER_BY_FORMULA",
        "message": "The formula for filtering records is invalid: Invalid formula. Please check your formula text."
    }
}

I’ve been testing this with Postman but can’t get it to work properly. What am I doing wrong with the formula syntax?

Had the same encoding nightmare with Airtable’s API last month. The other answers nailed it about URL encoding and the missing parenthesis, but here’s what saved me hours of debugging. Don’t manually encode the formula in the URL. Pass it as a parameter object instead - most HTTP libraries handle encoding automatically:

const params = {
filterByFormula: ‘FIND(“Smart watch will notify me when I need to take a break”, {Customer feedback}) > 0’,
api_key: ‘MY_API_KEY’
}

No more encoding errors and your formulas stay readable. Pro tip: use SEARCH instead of FIND for case-insensitive matching - works way better with customer feedback data.

Had this exact problem last year building a product catalog filter. FIND with URL encoding is a pain.

Sarahj’s right about the missing parenthesis and encoding, but there’s another issue. FIND returns a number (where it found the text) or throws an error if nothing matches. You need to check if the result actually exists.

Here’s what works:

api.airtable.com/v0/BASE_ID/Products?filterByFormula=FIND(%22Smart%20watch%20will%20notify%20me%20when%20I%20need%20to%20take%20a%20break%22%2C%7BCustomer%20feedback%7D)%3E0&api_key=MY_API_KEY

That >0 part (%3E0 encoded) makes sure you only get records where the text actually exists. Skip it and you’ll get weird results.

Btw, SEARCH works the same way but ignores case if that matters for your use case.

Your URL construction and character encoding have some issues. You are missing a closing parenthesis in your formula, and the special characters are not encoded correctly.

Here’s the corrected API endpoint:

api.airtable.com/v0/BASE_ID/Products?filterByFormula=FIND(%22Smart%20watch%20will%20notify%20me%20when%20I%20need%20to%20take%20a%20break%22%2C%7BCustomer%20feedback%7D)&api_key=MY_API_KEY

Be sure to encode everything properly: spaces should be converted to %20, quotes to %22, and curly braces to %7B and %7D. While most HTTP clients do this automatically, you may need to handle it manually for more complex formulas.

Quick tip - test your formula syntax directly in Airtable’s formula field before hitting the API. Saves tons of headaches with encoding issues. Also, check if your field names have spaces or special characters - they’ll break things.