Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

No "offset" value returned in JSON for >100 records

Topic Labels: API
4833 7
cancel
Showing results for 
Search instead for 
Did you mean: 

I’m trying to retrieve all the records in a table with curl over HTTPS.

I checked the table I’m targeting, and it has 283 records. I imagine I’ll need to issue three requests, since each request returns a maximum of 100 records.

I piped the results of my first curl command into a new file called output.txt and then tried to find the offset value from within the curl output file.

However, when I search through this file, I can’t find an offset value anywhere within the JSON like I expected, based on this line in the documentation:

If there are more records, the response will contain an offset.

Is there something obvious that I’m missing… I feel like there has to be. If anyone knows how I can get this offset value so that I can use it to request the next page of records (and the one after that), I’d be super grateful. :slightly_smiling_face:

7 Replies 7

Can you paste the curl URL you’re using here, with your API key, base ID, table name, etc changed to random values? You can also email support@airtable.com.

Sure! Thanks for your help, Kasra!

Here’s the full command I’m using, with random values for the API key, app name, field names, etc. Turns out I’m piping to items.json, which makes more sense than output.txt. :slightly_smiling_face:

curl "https://api.airtable.com/v0/appmwKq8r6WDyWnKS1/Items?maxRecords=100&sort%5B0%5D%5Bfield%5D=sequence_number&sort%5B0%5D%5Bdirection%5D=asc&fields=fk_order_number&fields=remarks" -H "Authorization: Bearer keymwKq8r6WDyWnKS1" > items.json

maxRecords=100 will limit the total number of records returned to 100, across all pages. If you want to get all records, omit maxRecords.

If you want to get all records, omit maxRecords.

Ah ha! That worked perfectly. Thanks for your help–I was pretty sure that it was something obvious!

All the best :grinning_face_with_smiling_eyes:

Hi!
How do you set no limit.
Trying to set maxRecords to 500 and it still return max 100.

100 is the upper limit.

I am having the same problem… I put this code in python and it works but it is only pulling up to 99 records… How can I offset to get the other records? I used the same omitmaxrecords
what am I missing?

I used a python code