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

# GET /api/external/earnings — Earnings stats, chart and recent transactions

> The same revenue the creator sees on their own dashboard: drop sales + tips + subscription payments, refunds and chargebacks excluded, bucketed by day in the caller's timezone.

- Source: https://www.dropfans.io/developers/reference/get-earnings
- Section: API reference
- OpenAPI: https://www.dropfans.io/developers/openapi.json

The same revenue the creator sees on their own dashboard: drop sales + tips + subscription payments, refunds and chargebacks excluded, bucketed by day in the caller's timezone.

Everything here is in **cents** (the balance endpoint is dollars). `stats.totalEarningsCents` is NET (after the platform fee); `grossEarningsCents` and the chart series are seller GROSS (buyer-paid minus tax, before the fee) so per-day merges against your own gross ledgers compare like for like. Pass `tz` = the creator's timezone (read it from [GET /api/external/timezone](https://www.dropfans.io/developers/reference/get-timezone.md)) or your day buckets won't match their dashboard.

> [!NOTE] transactions is a fixed cap, not a page
> `transactions` is always the newest 50 across all three sources — there is no pagination. To get a complete ledger, narrow the date window until fewer than 50 come back.

## Authentication

`Authorization: Bearer dpfn_...` — an API key generated in the creator's dashboard (Vault → API Connect). One key = one creator. Missing or invalid keys return 401 `{"error":"Unauthorized","code":"unauthorized"}`.

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `startDate` | string | yes | Window start, YYYY-MM-DD, interpreted in `tz`. |
| `endDate` | string | yes | Window end (inclusive), YYYY-MM-DD, interpreted in `tz`. |
| `tz` | string |  | IANA timezone for day bucketing. **Invalid values silently fall back to UTC** — no error. |

## Responses

### 200

Stats, chart and the newest transactions. All money in cents.

| Field | Type | Required | Description |
|---|---|---|---|
| `stats` | EarningsStats | yes | Window totals. Cents throughout (the balance endpoint is dollars). |
| `chart` | EarningsChart | yes | Bucketed GROSS series in the caller’s timezone. |
| `transactions` | EarningsTransaction[] | yes | The newest 50 transactions across all three sources — a fixed cap, not a page. For a complete ledger, narrow the date window until fewer than 50 come back. |

```json
{
  "stats": {
    "totalEarningsCents": 182050,
    "grossEarningsCents": 214180,
    "previousPeriodEarningsCents": 141200,
    "previousPeriodGrossEarningsCents": 166100,
    "transactionCount": 41,
    "avgTransactionCents": 4440,
    "uniqueCustomers": 28,
    "typeTotals": {
      "drop": {
        "grossCents": 150000,
        "netCents": 127500,
        "count": 30
      },
      "tip": {
        "grossCents": 44180,
        "netCents": 37550,
        "count": 8
      },
      "subscription": {
        "grossCents": 20000,
        "netCents": 17000,
        "count": 3
      }
    }
  },
  "chart": {
    "labels": [
      "Aug 18",
      "Aug 19"
    ],
    "values": [
      12500,
      9800
    ],
    "dates": [
      "2026-08-18",
      "2026-08-19"
    ],
    "groupBy": "day",
    "typedValues": {
      "drop": [
        10000,
        7500
      ],
      "tip": [
        2500,
        2300
      ],
      "subscription": [
        0,
        0
      ]
    }
  },
  "transactions": [
    {
      "id": "clx0rd3r000001sale",
      "productId": "clxdr0p000001prod",
      "productName": "Beach set — 6 photos",
      "amountCents": 2000,
      "grossAmountCents": 2500,
      "buyerEmail": "buyer@example.com",
      "buyerName": null,
      "paidAt": "2026-08-18T21:03:00.000Z",
      "type": "drop"
    }
  ]
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 400 | `{"error":"startDate and endDate query params are required (YYYY-MM-DD)"}` | Either date param is missing. |
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 500 | `{"error":"Failed to fetch earnings"}` | Query failed — retry later. |

## Notes

Chart bucketing: day for spans ≤31 days, week ≤90, month beyond. `transactions[].productId` only exists on type "drop" — use it to join a sale back to the drop your app created. Because refunds are excluded here but NOT in check-status, the two can legitimately disagree.

## Rate limiting

Per-key fixed windows by tier (Personal 60/min · 5,000/day; approved apps 300/min · 50,000/day; Dropfans-operated integrations exempt). Read the live values from X-RateLimit-Tier, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and their -Day variants; a 429 carries Retry-After and `{"error":"Rate limit exceeded","code":"rate_limited"}`. See [Rate limits](https://www.dropfans.io/developers/concepts/rate-limits.md).

## Code samples

### curl

```bash
curl "https://www.dropfans.io/api/external/earnings?startDate=2026-08-01&endDate=2026-08-19&tz=Europe%2FStockholm" \
  -H "Authorization: Bearer $DROPFANS_API_KEY"
```

### Node

```javascript
const res = await fetch(`https://www.dropfans.io/api/external/earnings?startDate=2026-08-01&endDate=2026-08-19&tz=Europe%2FStockholm`, {
  headers: {
    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
  },
});
console.log(await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://www.dropfans.io/api/external/earnings",
    headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
    params={"startDate": "2026-08-01", "endDate": "2026-08-19", "tz": "Europe/Stockholm"},
)
print(res.json())
```

## OpenAPI

```json
{
  "method": "GET",
  "path": "/api/external/earnings",
  "operationId": "getEarnings",
  "tags": [
    "earnings"
  ],
  "summary": "Earnings stats, chart and recent transactions",
  "description": "The same revenue the creator sees on their own dashboard: drop sales + tips + subscription payments, refunds and chargebacks excluded, bucketed by day in the caller's timezone.\n\nEverything here is in **cents** (the balance endpoint is dollars). `stats.totalEarningsCents` is NET (after the platform fee); `grossEarningsCents` and the chart series are seller GROSS (buyer-paid minus tax, before the fee) so per-day merges against your own gross ledgers compare like for like. Pass `tz` = the creator's timezone (read it from [GET /api/external/timezone](https://www.dropfans.io/developers/reference/get-timezone.md)) or your day buckets won't match their dashboard.\n\n> [!NOTE] transactions is a fixed cap, not a page\n> `transactions` is always the newest 50 across all three sources — there is no pagination. To get a complete ledger, narrow the date window until fewer than 50 come back.",
  "parameters": [
    {
      "name": "startDate",
      "in": "query",
      "required": true,
      "description": "Window start, YYYY-MM-DD, interpreted in `tz`.",
      "schema": {
        "type": "string",
        "format": "date"
      },
      "example": "2026-08-01"
    },
    {
      "name": "endDate",
      "in": "query",
      "required": true,
      "description": "Window end (inclusive), YYYY-MM-DD, interpreted in `tz`.",
      "schema": {
        "type": "string",
        "format": "date"
      },
      "example": "2026-08-19"
    },
    {
      "name": "tz",
      "in": "query",
      "required": false,
      "description": "IANA timezone for day bucketing. **Invalid values silently fall back to UTC** — no error.",
      "schema": {
        "type": "string",
        "default": "UTC",
        "format": "iana-timezone"
      },
      "example": "Europe/Stockholm"
    }
  ],
  "responses": {
    "200": {
      "description": "Stats, chart and the newest transactions. All money in cents.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "stats": {
                "type": "object",
                "properties": {
                  "totalEarningsCents": {
                    "type": "integer",
                    "description": "**NET** seller earnings in cents for the window (after platform fee).",
                    "example": 182050
                  },
                  "grossEarningsCents": {
                    "type": "integer",
                    "description": "Seller gross in cents (buyer-paid minus tax, before the platform fee) — matches the dashboard’s Gross toggle.",
                    "example": 214180
                  },
                  "previousPeriodEarningsCents": {
                    "type": "integer",
                    "description": "NET cents for the same-length window immediately before startDate."
                  },
                  "previousPeriodGrossEarningsCents": {
                    "type": "integer",
                    "description": "Gross cents for the previous window."
                  },
                  "transactionCount": {
                    "type": "integer",
                    "description": "Paid transactions in the window (drops + tips + subscription payments).",
                    "example": 41
                  },
                  "avgTransactionCents": {
                    "type": "integer",
                    "description": "Average NET cents per transaction."
                  },
                  "uniqueCustomers": {
                    "type": "integer",
                    "description": "Distinct buyer emails in the window.",
                    "example": 28
                  },
                  "typeTotals": {
                    "type": "object",
                    "properties": {
                      "drop": {
                        "type": "object",
                        "properties": {
                          "grossCents": {
                            "type": "integer",
                            "description": "Gross cents."
                          },
                          "netCents": {
                            "type": "integer",
                            "description": "Net cents."
                          },
                          "count": {
                            "type": "integer",
                            "description": "Transaction count."
                          }
                        },
                        "required": [
                          "grossCents",
                          "netCents",
                          "count"
                        ],
                        "description": "Totals for drop revenue."
                      },
                      "tip": {
                        "type": "object",
                        "properties": {
                          "grossCents": {
                            "type": "integer",
                            "description": "Gross cents."
                          },
                          "netCents": {
                            "type": "integer",
                            "description": "Net cents."
                          },
                          "count": {
                            "type": "integer",
                            "description": "Transaction count."
                          }
                        },
                        "required": [
                          "grossCents",
                          "netCents",
                          "count"
                        ],
                        "description": "Totals for tip revenue."
                      },
                      "subscription": {
                        "type": "object",
                        "properties": {
                          "grossCents": {
                            "type": "integer",
                            "description": "Gross cents."
                          },
                          "netCents": {
                            "type": "integer",
                            "description": "Net cents."
                          },
                          "count": {
                            "type": "integer",
                            "description": "Transaction count."
                          }
                        },
                        "required": [
                          "grossCents",
                          "netCents",
                          "count"
                        ],
                        "description": "Totals for subscription revenue."
                      }
                    },
                    "required": [
                      "drop",
                      "tip",
                      "subscription"
                    ],
                    "description": "Per-type window totals (additive field, 2026-07-22)."
                  }
                },
                "required": [
                  "totalEarningsCents",
                  "grossEarningsCents",
                  "previousPeriodEarningsCents",
                  "previousPeriodGrossEarningsCents",
                  "transactionCount",
                  "avgTransactionCents",
                  "uniqueCustomers",
                  "typeTotals"
                ]
              },
              "chart": {
                "type": "object",
                "properties": {
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Human-readable bucket label."
                    },
                    "description": "Chart x-axis labels, aligned with `values` and `dates`."
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "description": "GROSS cents for the bucket."
                    },
                    "description": "**GROSS** cents per bucket (gross so per-day merges against your own gross ledgers compare like for like)."
                  },
                  "dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "YYYY-MM-DD bucket key."
                    },
                    "description": "Bucket keys in the caller’s tz. Weekly buckets use the week-start date, monthly the 1st."
                  },
                  "groupBy": {
                    "type": "string",
                    "description": "Bucket size: day when the span is ≤31 days, week ≤90, else month.",
                    "enum": [
                      "day",
                      "week",
                      "month"
                    ]
                  },
                  "typedValues": {
                    "type": "object",
                    "properties": {
                      "drop": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "description": "Gross cents."
                        },
                        "description": "Gross cents per bucket from drops."
                      },
                      "tip": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "description": "Gross cents."
                        },
                        "description": "Gross cents per bucket from tips."
                      },
                      "subscription": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "description": "Gross cents."
                        },
                        "description": "Gross cents per bucket from subscriptions."
                      }
                    },
                    "required": [
                      "drop",
                      "tip",
                      "subscription"
                    ],
                    "description": "Per-type GROSS cent series aligned 1:1 with `dates` (additive field, 2026-07-22)."
                  }
                },
                "required": [
                  "labels",
                  "values",
                  "dates",
                  "groupBy",
                  "typedValues"
                ]
              },
              "transactions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The order / tip / renewal id (source-specific — matches nothing on the buyer’s side)."
                    },
                    "productId": {
                      "type": "string",
                      "description": "The sold product’s id — **drop transactions only**; absent on tips and subscriptions. Join it back to your own drop records."
                    },
                    "productName": {
                      "type": "string",
                      "description": "Product name, or the literal \"Tip\" / \"Subscription\".",
                      "example": "Beach set — 6 photos"
                    },
                    "amountCents": {
                      "type": "integer",
                      "description": "NET seller earnings in cents.",
                      "example": 2000
                    },
                    "grossAmountCents": {
                      "type": "integer",
                      "description": "Gross cents (buyer-paid minus tax).",
                      "example": 2500
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Buyer email when known.",
                      "format": "email"
                    },
                    "buyerName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Buyer display name — tips and subscriptions only; always null on drops."
                    },
                    "paidAt": {
                      "type": "string",
                      "description": "When it was paid.",
                      "format": "date-time"
                    },
                    "type": {
                      "type": "string",
                      "description": "Revenue source.",
                      "enum": [
                        "drop",
                        "tip",
                        "subscription"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "productName",
                    "amountCents",
                    "grossAmountCents",
                    "paidAt",
                    "type"
                  ]
                },
                "description": "The newest 50 transactions across all three sources — a fixed cap, not a page. For a complete ledger, narrow the date window until fewer than 50 come back."
              }
            },
            "required": [
              "stats",
              "chart",
              "transactions"
            ]
          },
          "example": {
            "stats": {
              "totalEarningsCents": 182050,
              "grossEarningsCents": 214180,
              "previousPeriodEarningsCents": 141200,
              "previousPeriodGrossEarningsCents": 166100,
              "transactionCount": 41,
              "avgTransactionCents": 4440,
              "uniqueCustomers": 28,
              "typeTotals": {
                "drop": {
                  "grossCents": 150000,
                  "netCents": 127500,
                  "count": 30
                },
                "tip": {
                  "grossCents": 44180,
                  "netCents": 37550,
                  "count": 8
                },
                "subscription": {
                  "grossCents": 20000,
                  "netCents": 17000,
                  "count": 3
                }
              }
            },
            "chart": {
              "labels": [
                "Aug 18",
                "Aug 19"
              ],
              "values": [
                12500,
                9800
              ],
              "dates": [
                "2026-08-18",
                "2026-08-19"
              ],
              "groupBy": "day",
              "typedValues": {
                "drop": [
                  10000,
                  7500
                ],
                "tip": [
                  2500,
                  2300
                ],
                "subscription": [
                  0,
                  0
                ]
              }
            },
            "transactions": [
              {
                "id": "clx0rd3r000001sale",
                "productId": "clxdr0p000001prod",
                "productName": "Beach set — 6 photos",
                "amountCents": 2000,
                "grossAmountCents": 2500,
                "buyerEmail": "buyer@example.com",
                "buyerName": null,
                "paidAt": "2026-08-18T21:03:00.000Z",
                "type": "drop"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Either date param is missing.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message describing what went wrong.",
                "example": "Vault item not found"
              }
            },
            "required": [
              "error"
            ]
          },
          "example": {
            "error": "startDate and endDate query params are required (YYYY-MM-DD)"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid API key.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Unauthorized",
            "code": "unauthorized"
          }
        }
      }
    },
    "403": {
      "description": "The app this key belongs to has been suspended by Dropfans. Every request fails with this until the app is reinstated — surface it to the creator and contact Dropfans.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "This integration has been suspended by Dropfans. Contact the app developer.",
            "code": "app_suspended"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded for the current minute or day window. Wait Retry-After seconds and retry.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "Retry-After": {
          "description": "Seconds to wait before retrying (sent with 429s).",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Rate limit exceeded",
            "code": "rate_limited"
          }
        }
      }
    },
    "500": {
      "description": "Query failed — retry later.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message describing what went wrong.",
                "example": "Vault item not found"
              }
            },
            "required": [
              "error"
            ]
          },
          "example": {
            "error": "Failed to fetch earnings"
          }
        }
      }
    }
  },
  "x-codeSamples": [
    {
      "lang": "cURL",
      "label": "curl",
      "source": "curl \"https://www.dropfans.io/api/external/earnings?startDate=2026-08-01&endDate=2026-08-19&tz=Europe%2FStockholm\" \\\n  -H \"Authorization: Bearer $DROPFANS_API_KEY\""
    },
    {
      "lang": "JavaScript",
      "label": "Node",
      "source": "const res = await fetch(`https://www.dropfans.io/api/external/earnings?startDate=2026-08-01&endDate=2026-08-19&tz=Europe%2FStockholm`, {\n  headers: {\n    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,\n  },\n});\nconsole.log(await res.json());"
    },
    {
      "lang": "Python",
      "source": "import os\nimport requests\n\nres = requests.get(\n    \"https://www.dropfans.io/api/external/earnings\",\n    headers={\"Authorization\": f\"Bearer {os.environ['DROPFANS_API_KEY']}\"},\n    params={\"startDate\": \"2026-08-01\", \"endDate\": \"2026-08-19\", \"tz\": \"Europe/Stockholm\"},\n)\nprint(res.json())"
    }
  ],
  "x-dropfans-docs": "https://www.dropfans.io/developers/reference/get-earnings"
}
```

---

Previous: [Delete a post (or cancel a scheduled one)](https://www.dropfans.io/developers/reference/delete-post.md) · Next: [Canonical profile, tip, subscribe and buy links](https://www.dropfans.io/developers/reference/get-links.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
