---
title: Functions
description: API Reference for Next.js Functions and Hooks.
url: "https://nextjs.org/docs/app/api-reference/functions"
docs_index: /docs/llms.txt
lastUpdated: 2025-06-16
prerequisites:
  - "API Reference: /docs/app/api-reference"
---

> For an index of all documentation, see [/docs/llms.txt](/docs/llms.txt).

- [after](/docs/app/api-reference/functions/after): API Reference for the after function.
- [cacheLife](/docs/app/api-reference/functions/cacheLife): Learn how to use the cacheLife function to set the cache expiration time for a cached function or component.
- [cacheTag](/docs/app/api-reference/functions/cacheTag): Learn how to use the cacheTag function to manage cache invalidation in your Next.js application.
- [catchError](/docs/app/api-reference/functions/catchError): API Reference for the catchError function.
- [connection](/docs/app/api-reference/functions/connection): API Reference for the connection function.
- [cookies](/docs/app/api-reference/functions/cookies): API Reference for the cookies function.
- [draftMode](/docs/app/api-reference/functions/draft-mode): API Reference for the draftMode function.
- [fetch](/docs/app/api-reference/functions/fetch): API reference for the extended fetch function.
- [forbidden](/docs/app/api-reference/functions/forbidden): API Reference for the forbidden function.
- [generateImageMetadata](/docs/app/api-reference/functions/generate-image-metadata): Learn how to generate multiple images in a single Metadata API special file.
- [generateMetadata](/docs/app/api-reference/functions/generate-metadata): Learn how to add Metadata to your Next.js application for improved search engine optimization (SEO) and web shareability.
- [generateSitemaps](/docs/app/api-reference/functions/generate-sitemaps): Learn how to use the generateSitemaps function to create multiple sitemaps for your application.
- [generateStaticParams](/docs/app/api-reference/functions/generate-static-params): API reference for the generateStaticParams function.
- [generateViewport](/docs/app/api-reference/functions/generate-viewport): API Reference for the generateViewport function.
- [headers](/docs/app/api-reference/functions/headers): API reference for the headers function.
- [ImageResponse](/docs/app/api-reference/functions/image-response): API Reference for the ImageResponse constructor.
- [io](/docs/app/api-reference/functions/io): API Reference for the io function.
- [navigation](/docs/app/api-reference/functions/navigation): Defer runtime work until the user navigates with the navigation function.
- [NextRequest](/docs/app/api-reference/functions/next-request): API Reference for NextRequest.
- [NextResponse](/docs/app/api-reference/functions/next-response): API Reference for NextResponse.
- [root-params](/docs/app/api-reference/functions/next-root-params): API Reference for the next/root-params module that provides access to root-level route parameters.
- [notFound](/docs/app/api-reference/functions/not-found): API Reference for the notFound function.
- [permanentRedirect](/docs/app/api-reference/functions/permanentRedirect): API Reference for the permanentRedirect function.
- [prefetch](/docs/app/api-reference/functions/prefetch): Defer runtime work until a per-link prefetch or navigation with the prefetch function.
- [redirect](/docs/app/api-reference/functions/redirect): API Reference for the redirect function.
- [refresh](/docs/app/api-reference/functions/refresh): API Reference for the refresh function.
- [revalidatePath](/docs/app/api-reference/functions/revalidatePath): API Reference for the revalidatePath function.
- [revalidateTag](/docs/app/api-reference/functions/revalidateTag): API Reference for the revalidateTag function.
- [unauthorized](/docs/app/api-reference/functions/unauthorized): API Reference for the unauthorized function.
- [unstable\_cache](/docs/app/api-reference/functions/unstable_cache): API Reference for the unstable\_cache function.
- [unstable\_noStore](/docs/app/api-reference/functions/unstable_noStore): API Reference for the unstable\_noStore function.
- [unstable\_rethrow](/docs/app/api-reference/functions/unstable_rethrow): API Reference for the unstable\_rethrow function.
- [updateTag](/docs/app/api-reference/functions/updateTag): API Reference for the updateTag function.
- [useLinkStatus](/docs/app/api-reference/functions/use-link-status): API Reference for the useLinkStatus hook.
- [useOffline](/docs/app/api-reference/functions/use-offline): API Reference for the useOffline hook.
- [useParams](/docs/app/api-reference/functions/use-params): API Reference for the useParams hook.
- [usePathname](/docs/app/api-reference/functions/use-pathname): API Reference for the usePathname hook.
- [useReportWebVitals](/docs/app/api-reference/functions/use-report-web-vitals): API Reference for the useReportWebVitals function.
- [useRouter](/docs/app/api-reference/functions/use-router): API reference for the useRouter hook.
- [useSearchParams](/docs/app/api-reference/functions/use-search-params): API Reference for the useSearchParams hook.
- [useSelectedLayoutSegment](/docs/app/api-reference/functions/use-selected-layout-segment): API Reference for the useSelectedLayoutSegment hook.
- [useSelectedLayoutSegments](/docs/app/api-reference/functions/use-selected-layout-segments): API Reference for the useSelectedLayoutSegments hook.
- [userAgent](/docs/app/api-reference/functions/userAgent): The userAgent helper extends the Web Request API with additional properties and methods to interact with the user agent object from the request.

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)