# API Service Unavailable

**Code:** `API-005` · **Category:** API

The API service is temporarily unable to process requests because the service is unavailable, overloaded, or undergoing maintenance.

## Common causes

- API server outage
- Scheduled maintenance
- Server overload
- Network connectivity problems
- Upstream service failure
- Temporary infrastructure issue

## Quick fix

1. Retry the request after a short delay
2. Check the API provider's status page
3. Implement retry with exponential backoff
4. Verify network connectivity

## Detailed fix by platform

### JavaScript

1. Implement exponential backoff for temporary failures
2. Handle 503 responses gracefully
3. Avoid aggressive retry loops

### PHP

1. Add controlled retry logic
2. Log temporary API failures
3. Use timeouts and backoff between retries

### API

1. Check the provider status page
2. Review service health and availability
3. Use a fallback service when appropriate

## How to diagnose

1. **Check the API response status** — 
2. **Check the provider's status page** — 
3. **Test network connectivity** — 
4. **Review API response headers** — 
5. **Check server and application logs** — 

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/api/api-005-api-service-unavailable)
