---
title: Functions
description: API Reference for Next.js Functions and Hooks.
url: "https://nextjs.org/docs/app/api-reference/functions"
version: 16.2.2
lastUpdated: 2026-04-02
prerequisites:
  - "API Reference: /docs/app/api-reference"
---



- [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.
- [unstable_catchError](/docs/app/api-reference/functions/catchError)
  - API Reference for the unstable_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.
- [NextRequest](/docs/app/api-reference/functions/next-request)
  - API Reference for NextRequest.
- [NextResponse](/docs/app/api-reference/functions/next-response)
  - API Reference for NextResponse.
- [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.
- [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.
- [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 [/docs/sitemap.md](/docs/sitemap.md)

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