{
  "openapi": "3.0.1",
  "info": {
    "title": "Apify Insights Analytics API",
    "description": "Export Monetization, Debugging, Acquisition, and Actor quality analytics from your personal Apify account using an encrypted Console session token to track progress on your personal devices and dashboards.",
    "version": "0.5",
    "x-build-id": "RpPME6YtY5YN9OLLH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lofomachines~apify-insights-exporter-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lofomachines-apify-insights-exporter-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/lofomachines~apify-insights-exporter-api/runs": {
      "post": {
        "operationId": "runs-sync-lofomachines-apify-insights-exporter-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/lofomachines~apify-insights-exporter-api/run-sync": {
      "post": {
        "operationId": "run-sync-lofomachines-apify-insights-exporter-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "sessionToken",
          "categories"
        ],
        "properties": {
          "sessionToken": {
            "title": "Apify Console session token",
            "type": "string",
            "description": "Required. Paste the value after 'Bearer' from an authenticated console-backend.apify.com request. This field is encrypted by Apify and never written to logs or output."
          },
          "categories": {
            "title": "Insights sections",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more Insights sections to export.",
            "items": {
              "type": "string",
              "enum": [
                "monetization",
                "debugging",
                "acquisition",
                "actorQuality"
              ],
              "enumTitles": [
                "Monetization",
                "Debugging",
                "Acquisition",
                "Actor quality"
              ]
            },
            "default": [
              "monetization",
              "debugging",
              "acquisition",
              "actorQuality"
            ]
          },
          "monthPreset": {
            "title": "Reporting month",
            "enum": [
              "current",
              "previous",
              "2-months-ago",
              "3-months-ago",
              "4-months-ago",
              "5-months-ago",
              "6-months-ago",
              "7-months-ago",
              "8-months-ago",
              "9-months-ago",
              "10-months-ago",
              "11-months-ago",
              "12-months-ago",
              "13-months-ago",
              "14-months-ago",
              "15-months-ago",
              "16-months-ago",
              "17-months-ago",
              "18-months-ago",
              "19-months-ago",
              "20-months-ago",
              "21-months-ago",
              "22-months-ago",
              "23-months-ago"
            ],
            "type": "string",
            "description": "Choose the month to export. Relative choices are converted to the correct YYYY-MM value when the run starts, so this menu never becomes outdated.",
            "default": "current"
          },
          "month": {
            "title": "Custom month for API integrations",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "type": "string",
            "description": "Optional advanced override in YYYY-MM format. Kept hidden in the no-code form for backward-compatible API integrations."
          },
          "actors": {
            "title": "Actors (optional)",
            "uniqueItems": true,
            "type": "array",
            "description": "Limit results to specific Actors. Enter an Actor ID, name, or username/name on each line. Leave empty for all owned Actors.",
            "items": {
              "type": "string"
            }
          },
          "actorQualityScope": {
            "title": "Actor quality scope",
            "enum": [
              "all",
              "selected"
            ],
            "type": "string",
            "description": "Export quality scores for every owned Actor, or only the Actors listed above.",
            "default": "all"
          },
          "actorQualityDetail": {
            "title": "Actor quality detail",
            "enum": [
              "score",
              "recommendations",
              "full"
            ],
            "type": "string",
            "description": "Score only is fastest. Recommendations adds improvement advice. Full also includes pricing, metrics, and basic Actor information.",
            "default": "score"
          },
          "includePreviousMonth": {
            "title": "Include acquisition comparison",
            "type": "boolean",
            "description": "Include the previous month so you can compare acquisition performance.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}