# What your agents earned and what they cost to run
Source: https://docs.simpleserve.ai/docs/api-reference/publisher-agents/get-publisher-earnings

Method: GET /v1/publisher/earnings
Base URL: https://api.simpleserve.ai

```json
{
  "path": "/v1/publisher/earnings",
  "method": "GET",
  "tags": [
    "Publisher Agents"
  ],
  "operationId": "getPublisherEarnings",
  "summary": "What your agents earned and what they cost to run",
  "description": "Gross earnings, the runtime cost you owe, and the difference. The difference may be negative when an agent is priced under what it costs to run, and is never clamped to zero.\n",
  "parameters": [
    {
      "name": "range",
      "in": "query",
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 90,
        "default": 30
      },
      "description": "How many days back to read."
    }
  ],
  "responses": {
    "200": {
      "description": "Earnings for the range.",
      "headers": {
        "x-request-id": {
          "$ref": "#/components/headers/RequestId"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublisherEarnings"
          }
        }
      }
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "403": {
      "$ref": "#/components/responses/PublisherForbidden"
    },
    "429": {
      "$ref": "#/components/responses/RateLimited"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  }
}
```