Skip to main content

Error handling

The TfL API uses conventional HTTP status codes. Codes in the 2xx range indicate success, 4xx indicate a client error, and 5xx indicate a server error.

For the three playground GET operations, see response codes in tfl-playground.json.

HTTP status codes​

CodeMeaning
200Success
400Bad request. Check your parameters.
401Unauthorized. Invalid or missing credentials (secured environments).
404Resource not found.
429Rate limited. Reduce request frequency.
500Server error. Retry later.

Authentication errors​

This demo uses public, unauthenticated GET requests only. A 401 response means that the upstream service changed its policy for your request path. The playground operations on this site don't normally return it.

Rate limiting​

If you receive 429, slow down and cache results where possible. See Authentication.