{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Activity Stats & Posting Trends",
    "description": "Turn Reddit's public archive history into chart-ready statistics: post and comment timelines for subreddits, users or all of Reddit, score sums, contributor leaderboards, author footprints and community profiles. No Reddit login, API key, cookie or proxy.",
    "version": "1.0",
    "x-build-id": "wvFCAvXFj9wmB9eXI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~reddit-activity-stats/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-reddit-activity-stats",
        "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/xyrelith-data~reddit-activity-stats/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-reddit-activity-stats",
        "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/xyrelith-data~reddit-activity-stats/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-reddit-activity-stats",
        "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",
        "properties": {
          "mode": {
            "title": "What to measure",
            "enum": [
              "activityTimeline",
              "topContributors",
              "authorFootprint",
              "communityProfile"
            ],
            "type": "string",
            "description": "Choose a statistics mode: an activity timeline, a contributor leaderboard, an author footprint, or community profiles.",
            "default": "activityTimeline"
          },
          "subreddits": {
            "title": "Subreddits",
            "maxItems": 100,
            "type": "array",
            "description": "Communities to analyse. Accepts bare names (python), r/ names (r/python) or full Reddit URLs. Used by timeline, top contributors and community profile modes.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "maxItems": 100,
            "type": "array",
            "description": "Reddit authors to analyse. Accepts bare names (spez), u/ names (u/spez) or profile URLs. Used by timeline and author footprint modes.",
            "items": {
              "type": "string"
            }
          },
          "granularity": {
            "title": "Time bucket",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Size of each timeline point. Weekly points start on Monday (UTC); monthly and yearly points start at the first day of the period.",
            "default": "month"
          },
          "contentType": {
            "title": "Content to count",
            "enum": [
              "both",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "Count posts, comments or both. In top contributors and author footprint this is also the ranking metric.",
            "default": "both"
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Only count posts whose title/body matches the keyword, or comments whose body matches it. Requires a subreddit or username; global keyword search is not supported by the archive."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Start of the range in YYYY-MM-DD. Empty means 12 months ago for timelines and leaderboards, or 2005-01-01 for author footprints."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "End of the range in YYYY-MM-DD (inclusive). Empty means today."
          },
          "includeScores": {
            "title": "Include score sums",
            "type": "boolean",
            "description": "Add one row per period with the sum of archived post scores (postScore) and comment scores (commentScore). Counting rows separately keeps every row chart-ready.",
            "default": false
          },
          "includeSubscriberTrend": {
            "title": "Include subscriber trend",
            "type": "boolean",
            "description": "Add a subscribers metric per period for each subreddit. Values are the archive's average subscriber count for the bucket.",
            "default": false
          },
          "includeRules": {
            "title": "Include community rules",
            "type": "boolean",
            "description": "Attach every archived moderator rule (name, description, kind, priority and violation reason) to each community profile.",
            "default": true
          },
          "includeLiveMetadata": {
            "title": "Add live RSS metadata",
            "type": "boolean",
            "description": "Read the public Reddit Atom feed to add the newest visible post date and to fill a profile when the archive has not indexed the community yet. It never supplies a count.",
            "default": true
          },
          "excludeAuthors": {
            "title": "Exclude authors from leaderboards",
            "maxItems": 100,
            "type": "array",
            "description": "Usernames to leave out of top contributors, for example AutoModerator and [deleted]. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of output rows. For timelines this caps the number of points returned; for rankings it caps the number of rows.",
            "default": 1000
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}