N8n API Pagination returns the same cursor

Hey,

I’m trying to fetch my n8n workflows using pagination, as described in the n8n API documentation. However, I always receive the same cursor for subsequent pages.

Example request:

GET /api/v1/workflows?limit=10&cursor=eyJsaW1pdCI6MTAsIm9mZnNldCI6MTB9
response:
data:
nextCursor: eyJsaW1pdCI6MTAsIm9mZnNldCI6MTB9

Even when requesting the next page, the nextCursor value never changes, but the data changes. Has anyone encountered this issue or knows what might be causing it?

Information on my n8n setup

  • n8n version: 1.123.14
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:

Hi @H_iba, welcome!

This is how to set up pagination:

Also, it’s much easier to use the built-in n8n API node..

1 Like

Thanks for responding, but I got about 80 workflows, so I got connection lost error when I use n8n node that’s why I was thinking about pagination and it is not supported in n8n node ! However, the pagination works in http node like you did but I always got connection lost most likely because of the high number of workflows (80)

1 Like

It’s supported!

I’ve 139 workflow atm and Get Many works without issues:

Can you please tell me if you’re using cloud or self hosted and which version ?

self hosted v2.6

1 Like