---
title: Functions
description: API Reference for Functions and Hooks in Pages Router.
url: "https://nextjs.org/docs/pages/api-reference/functions"
docs_index: /docs/pages/llms.txt
lastUpdated: 2025-04-15
prerequisites:
  - "API Reference: /docs/pages/api-reference"
---

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

- [catchError](/docs/pages/api-reference/functions/catchError): API Reference for the catchError function.
- [getInitialProps](/docs/pages/api-reference/functions/get-initial-props): Fetch dynamic data on the server for your React component with getInitialProps.
- [getServerSideProps](/docs/pages/api-reference/functions/get-server-side-props): API reference for \`getServerSideProps\`. Learn how to fetch data on each request with Next.js.
- [getStaticPaths](/docs/pages/api-reference/functions/get-static-paths): API reference for \`getStaticPaths\`. Learn how to fetch data and generate static pages with \`getStaticPaths\`.
- [getStaticProps](/docs/pages/api-reference/functions/get-static-props): API reference for \`getStaticProps\`. Learn how to use \`getStaticProps\` to generate static pages with Next.js.
- [NextRequest](/docs/pages/api-reference/functions/next-request): API Reference for NextRequest.
- [NextResponse](/docs/pages/api-reference/functions/next-response): API Reference for NextResponse.
- [useParams](/docs/pages/api-reference/functions/use-params): API Reference for the useParams hook in the Pages Router.
- [useReportWebVitals](/docs/pages/api-reference/functions/use-report-web-vitals): Use the Next.js \`useReportWebVitals\` hook to send Core Web Vitals and custom performance metrics to analytics.
- [useRouter](/docs/pages/api-reference/functions/use-router): Learn more about the API of the Next.js Router, and access the router instance in your page with the useRouter hook.
- [useSearchParams](/docs/pages/api-reference/functions/use-search-params): API Reference for the useSearchParams hook in the Pages Router.
- [userAgent](/docs/pages/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/pages/llms.txt](/docs/pages/llms.txt)