[{"data":1,"prerenderedAt":124},["ShallowReactive",2],{"term-c\u002Fcursor-pagination":3,"related-c\u002Fcursor-pagination":113},{"id":4,"title":5,"acronym":6,"body":7,"category":96,"description":97,"difficulty":98,"extension":99,"letter":100,"meta":101,"navigation":65,"path":102,"related":103,"seo":107,"sitemap":108,"stem":111,"subcategory":6,"__hash__":112},"terms\u002Fterms\u002Fc\u002Fcursor-pagination.md","Cursor Pagination",null,{"type":8,"value":9,"toc":90},"minimark",[10,15,19,23,26,30,79,83,86],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Cursor pagination uses a 'you are here' bookmark instead of page numbers. After getting results, you get a cursor (pointer) to the last item. To get the next batch, you say 'give me everything after THIS item.' It's more reliable than page numbers because it doesn't break when data changes.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Cursor-based pagination uses a pointer (cursor) to mark the position in the dataset, returning items before or after that cursor. It's more stable than offset pagination for real-time data because inserts\u002Fdeletes don't cause items to shift pages. Used by Twitter, Instagram, and most modern APIs.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F First request\nGET \u002Fapi\u002Fposts?limit=20\n\u002F\u002F Response includes: { data: [...], nextCursor: 'post_abc123' }\n\n\u002F\u002F Next page\nGET \u002Fapi\u002Fposts?limit=20&cursor=post_abc123\n","http","",[38,39,40,48,54,60,67,73],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,47],{},"\u002F\u002F First request\n",[41,49,51],{"class":43,"line":50},2,[41,52,53],{},"GET \u002Fapi\u002Fposts?limit=20\n",[41,55,57],{"class":43,"line":56},3,[41,58,59],{},"\u002F\u002F Response includes: { data: [...], nextCursor: 'post_abc123' }\n",[41,61,63],{"class":43,"line":62},4,[41,64,66],{"emptyLinePlaceholder":65},true,"\n",[41,68,70],{"class":43,"line":69},5,[41,71,72],{},"\u002F\u002F Next page\n",[41,74,76],{"class":43,"line":75},6,[41,77,78],{},"GET \u002Fapi\u002Fposts?limit=20&cursor=post_abc123\n",[11,80,82],{"id":81},"when-youll-hear-this","When You'll Hear This",[16,84,85],{},"\"Use cursor pagination for the infinite scroll feed.\" \u002F \"Cursor pagination handles live data better than offset.\"",[87,88,89],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":50,"depth":50,"links":91},[92,93,94,95],{"id":13,"depth":50,"text":14},{"id":21,"depth":50,"text":22},{"id":28,"depth":50,"text":29},{"id":81,"depth":50,"text":82},"backend","Cursor pagination uses a 'you are here' bookmark instead of page numbers. After getting results, you get a cursor (pointer) to the last item.","intermediate","md","c",{},"\u002Fterms\u002Fc\u002Fcursor-pagination",[104,105,106],"Offset Pagination","Pagination","GET",{"title":5,"description":97},{"changefreq":109,"priority":110},"weekly",0.7,"terms\u002Fc\u002Fcursor-pagination","S1an-GNF3gh4pal9yHansgRRfvn2ztiM7gw4mqPw-GQ",[114,118,121],{"title":106,"path":115,"acronym":6,"category":96,"difficulty":116,"description":117},"\u002Fterms\u002Fg\u002Fget","beginner","GET is the HTTP method for reading data. You're just asking 'can I see that?' — no changes, no side effects.",{"title":104,"path":119,"acronym":6,"category":96,"difficulty":98,"description":120},"\u002Fterms\u002Fo\u002Foffset-pagination","Offset pagination is the classic 'skip X rows and give me the next Y rows' approach. Page 3 of 20 results means skip 40 rows and give me 20.",{"title":105,"path":122,"acronym":6,"category":96,"difficulty":116,"description":123},"\u002Fterms\u002Fp\u002Fpagination","Pagination is splitting a huge list of results into pages.",1776518271160]