> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parsefy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Check

> Check API availability and status

## Overview

The `/health` endpoint provides a simple way to check if the Parsefy API is operational. It requires no authentication and returns basic status information.

## Request

No parameters or authentication required.

```bash theme={null}
curl https://api.parsefy.io/health
```

## Response

<ResponseField name="status" type="string">
  Current API status. Returns `"healthy"` when operational.
</ResponseField>

<ResponseField name="timestamp" type="string">
  Current server timestamp in ISO 8601 format.
</ResponseField>

### Success Response

```json theme={null}
{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00Z"
}
```

## Use Cases

### Monitoring and Uptime Checks

Use the health endpoint in your monitoring systems:

```bash theme={null}
# Simple availability check
curl -f https://api.parsefy.io/health || echo "API is down"
```

### Pre-flight Checks

Verify API availability before processing documents:

```python theme={null}
import httpx

def check_parsefy_health():
    response = httpx.get("https://api.parsefy.io/health")
    return response.status_code == 200 and response.json()["status"] == "healthy"

if check_parsefy_health():
    # Proceed with extraction
    result = client.extract(file="document.pdf", schema=Schema)
else:
    # Handle API unavailability
    log.error("Parsefy API is not available")
```

### Load Balancer Health Checks

Configure your load balancer to check API health:

```yaml theme={null}
# Example: AWS ALB health check configuration
health_check:
  path: /health
  interval: 30
  timeout: 5
  healthy_threshold: 2
  unhealthy_threshold: 3
```

## Root Endpoint

The root endpoint (`/`) also returns API information:

```bash theme={null}
curl https://api.parsefy.io/
```

### Response

```json theme={null}
{
  "name": "Parsefy API",
  "version": "1.0.0",
  "description": "Universal Document Extraction Engine",
  "documentation": "https://docs.parsefy.io"
}
```

## Status Codes

| Code  | Meaning                                |
| ----- | -------------------------------------- |
| `200` | API is healthy and operational         |
| `503` | Service unavailable (temporary outage) |

<Note>
  The health endpoint is designed to always respond quickly. If you don't receive a response within 5 seconds, the API may be experiencing issues.
</Note>
