# List an ad rule's runs

Returns an ad rule's runs, one page at a time.

```http
GET https://api.pozy.ai/v1/ads/rules/{ruleId}/runs
```

- Area: Ads / Ad Rules
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `ruleId` (string, required)

## Query parameters

- `limit` (integer)
- `skip` (integer)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/ads/rules/6cd4059483de62b474d02fe7/runs?limit=20" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/rules/6cd4059483de62b474d02fe7/runs?limit=20", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/ads/rules/6cd4059483de62b474d02fe7/runs",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 20,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `runs`, array of object, required
  - `id`, string, required
  - `ranAt`, string (date-time), required
  - `outcome`, string, required: One of `triggered`, `cooldown`, `no_match`, `failed`
  - `objectsEvaluated`, integer, required
  - `actedObjectIds`, array of string, required
  - `evaluation`, object, required: Can be null
    - `rule`, object
      - `name`, string
      - `profileId`, string
      - `accountId`, string
      - `platform`, string
      - `platformAdAccountId`, string
      - `level`, string: One of `campaign`, `adset`
    - `today`, string (date)
    - `timezone`, string
    - `timezoneAssumed`, boolean
    - `currency`, string: Can be null
    - `matched`, array of object
      - `id`, string, required
      - `name`, string, required
      - `campaignId`, string, required: Can be null
      - `matched`, boolean, required
      - `conditions`, array of object, required
        - `metric`, string, required: One of `spend`, `impressions`, `clicks`, `conversions`, `ctr`, `cpc`, `cpm`, `cpa`, `roas`, `reach`, `frequency`
        - `window`, string, required: One of `today`, `yesterday`, `last_3d`, `last_7d`, `last_14d`, `last_30d`
        - `op`, string, required: One of `>`, `>=`, `<`, `<=`
        - `value`, number, required: At least 0
        - `actual`, number, required: Can be null
        - `met`, boolean, required
    - `actions`, array of object
      - `objectId`, string, required
      - `type`, string, required: One of `pause`, `activate`, `adjust_budget`
      - `status`, string, required: One of `done`, `skipped`, `failed`
      - `reason`, string
      - `previousDailyBudget`, number
      - `newDailyBudget`, number
    - `notification`, object
      - `status`, string, required: One of `done`, `failed`
      - `reason`, string
  - `error`, string, required: Can be null

```json
{
  "runs": [
    {
      "id": "6bfebd43ddc270f6d2c56fc5",
      "ranAt": "2026-10-02T09:00:00.000Z",
      "outcome": "triggered",
      "objectsEvaluated": 1,
      "actedObjectIds": [
        "string"
      ],
      "evaluation": {
        "rule": {
          "name": "Acme",
          "profileId": "6a0b6573846efc28aaa9a3ff",
          "accountId": "696e0b682d0a31188e7a2ba9",
          "platform": "instagram",
          "platformAdAccountId": "673c621a82c88059710de3fd",
          "level": "campaign"
        },
        "today": "2026-10-01",
        "timezone": "America/New_York",
        "timezoneAssumed": true,
        "currency": "USD",
        "matched": [
          {
            "id": "6bfebd43ddc270f6d2c56fc5",
            "name": "Acme",
            "campaignId": "65a3737dd8b11ea61f199e6e",
            "matched": true,
            "conditions": [
              {}
            ]
          }
        ],
        "actions": [
          {
            "objectId": "6cd1b53a19a7e157d2d46b68",
            "type": "pause",
            "status": "done",
            "reason": "string",
            "previousDailyBudget": 12.5,
            "newDailyBudget": 12.5
          }
        ],
        "notification": {
          "status": "done",
          "reason": "string"
        }
      },
      "error": "string"
    }
  ]
}
```
