logoNext.js English
DocumentationBlogLearnPages RouterSet up a new Next.js appWelcome to Next.jsEditing the PageNavigate Between PagesSet up pagesPages in Next.jsLink ComponentClient-Side NavigationLayout ComponentAssets, Metadata, and CSSSetupAssetsMetadataThird-Party JavaScriptCSS StylingGlobal StylesPolishing LayoutStyling TipsCreating a simple blog architecturePre-rendering and Data FetchingSet upPre-renderingTwo Forms of Pre-renderingStatic Generation with and without DataImplement getStaticPropsgetStaticProps DetailsFetching Data at Request TimeDynamic RoutesSet upPage Path Depends on External DataImplement getStaticPathsImplement getStaticPropsRender MarkdownPolishing the Post PagePolishing the Index PageDynamic Routes DetailsAPI RoutesSet upCreating API RoutesAPI Routes DetailsDeploying Your Next.js AppSet upPush to GitHubDeploy to VercelNext.js and VercelOther Hosting Options
logoNext.js English
DocumentationBlogLearn

API Routes

Next.js has support for API Routes, which let you easily create an API endpoint as a Node.js serverless function. Although it’s not necessary for our blog app, we’ll briefly talk about how to use it in this lesson.

What You’ll Learn in This Lesson

In this lesson, you’ll learn:

  • How to create an API Route.
  • Some useful information on API Routes.

Dynamic Routes Details

Previous Page

Set up

Next Page

On this page

What You’ll Learn in This Lesson