Mar 23, 2017 09:45 AM
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
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:
Mar 23, 2017 09:49 AM
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 firstname.lastname@example.org.
Mar 23, 2017 09:57 AM
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
Mar 23, 2017 10:05 AM
maxRecords=100 will limit the total number of records returned to 100, across all pages. If you want to get all records, omit
Mar 23, 2017 10:28 AM
If you want to get all records, omit
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:
May 02, 2017 12:32 AM
How do you set no limit.
Trying to set maxRecords to 500 and it still return max 100.
May 04, 2017 03:57 AM
100 is the upper limit.
May 02, 2019 11:55 AM
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