Help

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

2517 2
cancel
Showing results for 
Search instead for 
Did you mean: 
John_Doe
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

John_Doe
5 - Automation Enthusiast
5 - Automation Enthusiast

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.

John_Doe
5 - Automation Enthusiast
5 - Automation Enthusiast

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:

Fredrik_Hassele
4 - Data Explorer
4 - Data Explorer

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

100 is the upper limit.

David_Ramos
4 - Data Explorer
4 - Data Explorer

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