{
  "openapi": "3.0.1",
  "info": {
    "title": "Subreddit Audience Overlap & Lookalike Community Finder",
    "description": "Map where a subreddit's audience also spends time. Sample recent active authors from seed communities and rank lookalike subreddits by shared authors, overlap and size-adjusted lift. Also discovers communities by prefix or keyword and profiles user lists. No Reddit login, API key, cookie or proxy.",
    "version": "1.0",
    "x-build-id": "gfRVQhkdTSi9HUZw2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~subreddit-audience-overlap/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-subreddit-audience-overlap",
        "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~subreddit-audience-overlap/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-subreddit-audience-overlap",
        "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~subreddit-audience-overlap/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-subreddit-audience-overlap",
        "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 find",
            "enum": [
              "overlap",
              "discover",
              "userSet"
            ],
            "type": "string",
            "description": "Audience overlap finds lookalike communities for one or more seed subreddits. Discover lists communities by name prefix or keyword. User set profiles a list of usernames collectively.",
            "default": "overlap"
          },
          "subreddits": {
            "title": "Seed subreddits",
            "maxItems": 50,
            "type": "array",
            "description": "Overlap mode: communities whose audience you want to map. Accepts bare names (python), r/ names or full Reddit URLs. Each seed is analysed separately.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "maxItems": 100,
            "type": "array",
            "description": "User-set mode: Reddit authors to profile together. Accepts bare names, u/ names or profile URLs.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Discover query",
            "type": "string",
            "description": "Discover mode: a subreddit name prefix (python, data) or a keyword phrase (machine learning, personal finance). Prefixes search the archive directly; phrases also use Reddit's public community-search RSS and archive name/description matching."
          },
          "sampleAuthors": {
            "title": "Authors sampled per seed",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Overlap mode: how many recent unique authors to sample from each seed before reading their footprints. Larger samples are more stable but cost more archive requests. 200 is a good default; 25 is enough for a quick test.",
            "default": 200
          },
          "activityWindow": {
            "title": "Activity window",
            "enum": [
              "7",
              "30",
              "90",
              "180",
              "365"
            ],
            "type": "string",
            "description": "How far back recent activity is sampled. The same window is used for the seed authors and their footprints.",
            "default": "90"
          },
          "contentType": {
            "title": "Activity to count",
            "enum": [
              "both",
              "posts",
              "comments"
            ],
            "type": "string",
            "description": "Count posts, comments or both when sampling authors and building footprints. Comments usually give the largest sample.",
            "default": "both"
          },
          "excludeBots": {
            "title": "Exclude bots and AutoModerator",
            "type": "boolean",
            "description": "Leave out AutoModerator and usernames that look like bots (names ending in bot or containing _bot/-bot). Deleted and removed authors are always excluded.",
            "default": true
          },
          "excludeAuthors": {
            "title": "Always exclude these authors",
            "maxItems": 100,
            "type": "array",
            "description": "Additional usernames to leave out of the sample, case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "minSharedUsers": {
            "title": "Minimum users in a community",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Overlap mode: keep a related community only when at least this many sampled seed authors are active there. User-set mode: keep a community only when at least this many supplied users are active there. Raise it to cut one-off crossovers.",
            "default": 1
          },
          "maxLookalikes": {
            "title": "Related communities per seed",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Overlap mode: maximum related communities to return for each seed, ranked by shared authors.",
            "default": 20
          },
          "includeNsfw": {
            "title": "Include NSFW communities",
            "type": "boolean",
            "description": "When off, communities marked over-18 by the archive are left out of related and discover results. Seed subreddits may still be NSFW.",
            "default": false
          },
          "minSubscribers": {
            "title": "Minimum subscribers",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Skip communities below this subscriber count. Applies to related communities, discover results and user-set results. Leave 0 for no minimum.",
            "default": 0
          },
          "maxSubscribers": {
            "title": "Maximum subscribers",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Skip communities above this subscriber count. Leave empty for no maximum. A maximum below the minimum matches nothing."
          },
          "excludeSubreddits": {
            "title": "Exclude these communities",
            "maxItems": 100,
            "type": "array",
            "description": "Subreddits to leave out of related and user-set results, for example a brand's own community or a known spam sub.",
            "items": {
              "type": "string"
            }
          },
          "discoverSort": {
            "title": "Sort discovered communities by",
            "enum": [
              "subscribers",
              "created",
              "name"
            ],
            "type": "string",
            "description": "Discover mode only: order matched communities by subscriber count, creation date or name.",
            "default": "subscribers"
          },
          "discoverSortOrder": {
            "title": "Discovery sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Discover mode only: descending puts the largest, newest or last name first; ascending reverses it.",
            "default": "desc"
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Overall cap on dataset rows. In overlap mode this covers every seed and every related community.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}