Dynamic APIs
Functions and props that depend on the incoming request, such as cookies(), headers() and searchParams, which make a route dynamic.
In more detail
Using any of them tells Next.js the route cannot be built ahead of time, so it renders per request and skips the Full Route Cache. Next.js 15 renamed "dynamic functions" to Dynamic APIs and made them async.
Related terms
- cookies() — The async function from next/headers that reads the request's cookies, and in Server Actions or Route Handlers can also set or delete them.
- headers() — The async function from next/headers that returns the incoming request's HTTP headers for reading in Server Components.
- searchParams — The page prop holding the URL query string values, such as { q: 'shoes' } for /search?q=shoes.
- dynamic rendering — Rendering a route fresh on the server for each request, so it can show personalised or constantly changing data.
Taught in
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Route Handlers: RESTful Endpoints with NextRequest — Next.js 15 & Modern App Router Architecture