Help

Re: Invalid Offset Value

Solved
Jump to Solution
1577 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Maurizio_polver
6 - Interface Innovator
6 - Interface Innovator

Hi there,

I'm facing this issue unfortunetly i checked on the community but none of the solutions work for me.

This is the error: "type" Invalid_Offset_Value - The value of offset 100 is invalid.

I'm trying to get 350 rows. I already did a first api call to get the first 100 rows, what i need is to continue with the second call.

When i try this url https://api.airtable.com/v0/appOwBv51ihqo****/TableName/?fields%5B%5D=Mese%20Nome everything work fine, when i use the same URL adding the offset value, i get the error: https://api.airtable.com/v0/appOwBv51ihqo****/TableName/?fields%5B%5D=Mese%20Nome&offset=100

What am i doing wrong? I can't work much on the code, i just can modify the URL. I've also tried to put the recordId instead of the "100" but i get the same reply.

 

Hope you can help, thank you very much

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

The offset isn't the number at which you want to start getting records I'm afraid, and is a value returned by Airtable in your initial call that looks something like this: itrloILUa4LWba21F/recreX96b1OkfThVj

And so in your context, it'd look something like:

https://api.airtable.com/v0/appOwBv51ihqo****/TableName/?fields%5B%5D=Mese%20Nome&offset=itrloILUaxLWba21F/recreX96bXOkfThVj

I'm sure you're already familiar with the documentation, and for future reference you can tell what kind of data to pass along by checking out the '<number>' and '<string>' bits!

Screenshot 2024-03-17 at 5.46.22 PM.png

 

See Solution in Thread

5 Replies 5

The offset value is a long string of letters and numbers that has to be taken from the response of your previous API call.

Look at your first API call, and at the end of the response, there will be an offset value returned to you.

Use that offset value for your next API call. 

TheTimeSavingCo
18 - Pluto
18 - Pluto

The offset isn't the number at which you want to start getting records I'm afraid, and is a value returned by Airtable in your initial call that looks something like this: itrloILUa4LWba21F/recreX96b1OkfThVj

And so in your context, it'd look something like:

https://api.airtable.com/v0/appOwBv51ihqo****/TableName/?fields%5B%5D=Mese%20Nome&offset=itrloILUaxLWba21F/recreX96bXOkfThVj

I'm sure you're already familiar with the documentation, and for future reference you can tell what kind of data to pass along by checking out the '<number>' and '<string>' bits!

Screenshot 2024-03-17 at 5.46.22 PM.png

 

Maurizio_polver
6 - Interface Innovator
6 - Interface Innovator

Thank you very much for your time.
Everything solved thanks to you

BeUni_Tecnologi
5 - Automation Enthusiast
5 - Automation Enthusiast

@TheTimeSavingCo I'm using the Airtable Node SDK and the type for `offset` is `number` but it throws an error of "INVALID_OFFSET_VALUE". Passing a `string` also throws an error "Error: Airtable: invalid parameters for `select`".

Also, I don't get the `offset` string from the response when using the SDK.

Is it possible to do pagination with the SDK? I see there's a function for `.select().eachPage()` but I'm not sure how to use it to implement pagination.

If requesting via Fetch, I get the `offset` string from the response and I'm able to send it to the next request and get the next page, but how do I navigate backwards? I would need to store in a hash map ( { 0: null, 1: 'first_page/offset_string', ... } ) ?

 

Hi Maurizio, 

Can you help to share how you use the offset code to continue load 100+ records in Power BI?  I got 1st 100row, but have not clue at all about the next step for the remained rows.  Thanks!