Skip to main content
API Keys | Terms of Use

Errors

If an error occurs, the web service will return an HTTP response with the error status code and an XML or JSON body containing the error. For example:

XML

Request

https://api.stlouisfed.org/fred/series/updates

Response

HTTP/1.x 400 Bad Request
Content-Type: text/xml;charset=utf-8
...

<error code="400" message="Bad Request.  Variable api_key has not been set."/>

The message attribute of the error tag contains a description of the error. All errors use standard HTTP status codes. There are no custom error codes. The following HTTP status code may be returned:

  • 400 Bad Request
  • 404 Not Found
  • 500 Internal Server Error

JSON

Request

https://api.stlouisfed.org/fred/series/updates?file_type=json

Response

HTTP/1.x 400 Bad Request
Content-Type: text/xml;charset=utf-8
...

{
    "error_code": 400,
    "error_message": "Bad Request.  Variable api_key is not set.  Read https://research.stlouisfed.org/docs/api/api_key.html for more information."
}

Subscribe to our newsletter


Follow us

Twitter logo Google Plus logo Facebook logo YouTube logo LinkedIn logo
Back to Top