API routes

The Pages Router way of writing back-end endpoints: files in pages/api that export a handler taking req and res.

In more detail

They still work in the Pages Router. App Router projects use Route Handlers, which are built on Web standard Request and Response instead of Node.js objects.

Related terms

Taught in

References