Cannot GET API Origin: Application & API OSI layer 7 · Application Last updated 15 Oct 2026

API Error: Cannot GET /api/... / No route matches / The route could not be found

The server has no route for this URL and HTTP method combination — the endpoint path, API version prefix or method is wrong.

Exact message you may see No route matchesThe route could not be foundno Route matched with those valuesRoute not found
Seen on: REST API

Meaning

Unlike a “resource not found” (the endpoint exists, the record doesn’t), here the framework never matched a handler. Express answers “Cannot GET /path”, Rails “No route matches [GET]”, Laravel “The route api/x could not be found”, Django “Page not found (404)”, and API gateways “no Route matched with those values”.

Usually the path is slightly off — missing /api or /v1 prefix, trailing slash, wrong base URL for the environment — or the route exists only for another method.

Common causes

  • Typo or missing prefix in the path (/api, /v1)
  • Base URL points at the wrong service or environment
  • Route defined for POST but called with GET (or vice versa)
  • Router mounted at a different path, or the route file isn’t loaded
  • Deployed build doesn’t include the new route yet

⚡ Quick fix

  1. Compare the full URL and method with the API docs character by character
  2. List the server’s registered routes
  3. Check the base URL / environment variable the client uses

Detailed fix by platform

Express

  1. bash
    // print every registered route
    app._router.stack.filter(l => l.route).forEach(l => console.log(Object.keys(l.route.methods), l.route.path));

Laravel

  1. php artisan route:list --path=api

Rails

  1. bin/rails routes | grep users

How to diagnose

  1. Method — Same method the route is defined for?
  2. Prefix — /api, /v1, trailing slash?
  3. Environment — Which base URL is the client using?
  4. Deploy — Is the route in the running build?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1019 — Cloudflare Error 1019: Compute server error (Workers) (Cloudflare)101912 UNIMPLEMENTED — gRPC Error: 12 UNIMPLEMENTED: unknown service x / Method not found (API)12 UNIMPLEMENTED404 — HTTP 404 Not Found (HTTP)404404 — 404 only with or without a trailing slash (HTTP)404405 — HTTP 405 Method Not Allowed (HTTP)405api_version_invalid — API Error: Invalid or unsupported API version (API)api_version_invalidNetwork is unreachable — connect: Network is unreachable (ENETUNREACH) (Linux)Network is unreachableNextRouter was not mounted — Error: NextRouter was not mounted. (React)NextRouter was not mo…Cannot GET

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.