They solve different problems, so the question is who calls and what comes back.
A Server Action is a mutation for your own React tree. Next.js calls it with a POST to the current page's URL, a Next-Action id generated at build time, and a body encoded by React. The response is an RSC stream that can carry the re-rendered page with the return value. It is the right tool for forms and buttons in your app: no URL to design, typed arguments, revalidation folded into one round trip.
A route handler (app/**/route.js) is an ordinary HTTP endpoint. You export GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS, get a Web Request (a NextRequest) and return any Response: JSON, XML, a file, a stream, a redirect. Choose it when:
- Someone else calls it. A payment provider's webhook, a mobile app, a CLI or a partner can't produce an action id or React's encoding; they need a stable URL and a documented body.
- You need HTTP itself: other verbs, status codes,
Content-Type, CORS headers, the raw body for signature checks. - You serve a read others can cache: an RSS feed, a JSON endpoint. Actions are
POSTs and, per the docs, the client runs them one at a time, so they're a poor fit for fetching. - You stream a long response, such as model output.
On Next.js 16.4.5 (next build && next start, Cache Components off) a GET handler ran per request: two curl calls returned different timestamps. export const dynamic = 'force-static' made it ○ in the build table and both calls matched.
Don't call your own route handlers from Server Components: per the docs, that's an extra HTTP hop, and it fails at build for a prerendered page (not run here). Call the data function directly.