# Retry

Source: https://docs.scrappey.com/docs/retry

> Automatically retry a failed request up to 5 times to improve success rates against timeouts, captchas, or network instability.

## Command

`"retries"`

**Purpose**: Retries the entire request if it fails.

**Limits**:

- Maximum retries: `5`
- Max total execution time: `240` seconds (4 minutes)

## Parameters

| Parameter | Type   | Required | Description                                   |
| --------- | ------ | -------- | --------------------------------------------- |
| `retries` | number | No       | Number of automatic retries (1–5 recommended) |

## Example

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "retries": 3
  }'
```

## Notes

- Retries are only performed if the request fails (e.g., timeout, blocked, crash).
- Each retry counts against your total scrape usage.
- If the combined retries exceed 240 seconds, the request will be aborted.

Use automatic retries for reliability in unstable environments or when targeting sites with aggressive anti-bot systems.
