# Browse campaigns

> Live campaigns you could work on, with what each pays you, its fit with your profile and the brand's rating.

```http
GET https://yapfactory.com/api/v1/marketplace/campaigns
```

|   |   |
| --- | --- |
| Who can use it | Creators |
| Tier | `read`: Reads. Changes nothing. |
| Scope | `marketplace:read`, or `read` |
| Idempotency-Key | Not used |
| Rate limit | Reads: 120 a minute |
| MCP tool | [`browse_campaigns`](https://yapfactory.com/developers/tools.md#browse_campaigns) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | `string` | no | Words to look for in the product or brief. Up to 100 characters. |
| `category` | query | `string` | no | Only this product category, e.g. Health & Fitness. Up to 60 characters. |
| `country` | query | `string` | no | Only campaigns for this audience country, e.g. US. Up to 10 characters. |
| `sort` | query | `"fit" \| "newest" \| "pay" \| "rating"` | no | fit: best match for your profile first. pay: what you'd earn, highest first. rating: best rated brands first. Default `"fit"`. |
| `limit` | query | `integer` | no | How many to return. 1 to 50. Default `20`. |
| `cursor` | query | `string` | no | The `nextCursor` from the previous page. Leave out for the first page. |

## Example request

```bash
curl "https://yapfactory.com/api/v1/marketplace/campaigns?sort=newest&limit=10" \
  -H "Authorization: Bearer $YAP_API_KEY"
```

## Response

`200` with a list. Each item in `data` is what the MCP tool returns in `campaigns`, and `meta` carries the summary fields. Pass `nextCursor` back as `cursor` until `hasMore` is false. [How paging works](https://yapfactory.com/developers/pagination.md).

```json
{
  "data": [
    {
      "id": "8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f",
      "title": "Morning routine with Sleepwell",
      "product": "Sleepwell",
      "category": "Health & Fitness",
      "brand": "Sleepwell",
      "brandRating": {
        "average": 4.8,
        "count": 6,
        "completedDeals": 7,
        "onTimeReviewRate": 1,
        "medianReviewHours": 9.5,
        "medianHoursDraftToPayout": 14
      },
      "pays": {
        "minor": 2500,
        "currency": "USD",
        "formatted": "$25.00"
      },
      "videos": 1,
      "openingsPerVideo": 1,
      "lengthSeconds": 30,
      "adRights": "Brand's channels, no ads",
      "targetCountries": [
        "US"
      ],
      "deadline": "2026-12-16T12:00:00.000Z",
      "fit": "Great fit",
      "fitReasons": [
        "You make wellness videos",
        "71% of your audience is in the US"
      ],
      "asked": false,
      "url": "https://yapfactory.com/creator/browse/8f14e45f-ceea-4e7a-9b1d-2c3b4a5d6e7f"
    }
  ],
  "nextCursor": null,
  "hasMore": false,
  "meta": {
    "page": 1,
    "pages": 8,
    "total": 192,
    "yourRate": {
      "minor": 2500,
      "currency": "USD",
      "formatted": "$25.00"
    },
    "hiddenBecauseAboveBudget": 0
  }
}
```

An example: fields that don't apply are `null`, and new fields can be added at any time, so ignore ones you don't know. Every response carries `Request-Id` and the `RateLimit-*` headers.

## Errors

| Code | Status | When |
| --- | --- | --- |
| `invalid_request` | 400 | A field failed validation (see `meta.issues`), or an unknown query parameter. |
| `unauthorized` | 401 | No token, or it's wrong, expired, revoked or from the other environment. |
| `insufficient_scope` | 403 | The token doesn't have `marketplace:read` (or `read`). |
| `forbidden` | 403 | Only for creators, or the account can't do this yet (email not confirmed, paused). |
| `rate_limited` | 429 | Over the limit. Wait for `Retry-After` seconds. |
| `internal` | 500 | Our fault. Retry later, and send us the `requestId` if it keeps happening. |

Every error has the same shape. See [Errors](https://yapfactory.com/developers/errors.md) for what to do about each one.

---

HTML version: https://yapfactory.com/developers/api/browse_campaigns
