{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Email Scraper — Emails from Posts & Comments",
    "description": "Scrape reddit.com for publicly posted emails in full posts, comments and profile bios. Get unique addresses with source links and context, filter by domain, and track new or changed contacts across scheduled runs. Export JSON or CSV.",
    "version": "0.2",
    "x-build-id": "mKzBMoU9EuruamAkk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~reddit-email-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-reddit-email-scraper",
        "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/blackfalcondata~reddit-email-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-reddit-email-scraper",
        "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/blackfalcondata~reddit-email-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-reddit-email-scraper",
        "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": {
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Reddit URLs to scrape — subreddits, post pages, user profiles, community pages, or search result pages. Each URL determines what type of content is fetched. Use the full link that includes the subreddit (reddit.com/r/<community>/... , any subdomain works). Links that need Reddit to resolve them first — redd.it short links, /r/<community>/s/... share links, and post links without the community (reddit.com/comments/...) — are skipped, as are non-Reddit URLs; the run log says how many were skipped.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "🔎 Search Terms",
            "type": "array",
            "description": "Search Reddit for these terms. Each entry becomes an independent search. Post searches fetch the full post body and its comments before extracting emails.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Maximum Contact Records",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of email-bearing records to save across all sources. Records without emails do not count toward this limit. One record may contain more than one address.",
            "default": 100
          },
          "searchType": {
            "title": "🔎 Search Type",
            "enum": [
              "posts",
              "comments",
              "communities"
            ],
            "type": "string",
            "description": "Choose post searches (full post text plus comment threads), comment searches, or community searches. Only records containing a matching email are returned.",
            "default": "posts"
          },
          "sort": {
            "title": "📊 Sort",
            "enum": [
              "relevance",
              "hot",
              "top",
              "new",
              "comments"
            ],
            "type": "string",
            "description": "Sort order for results. Search supports every option. Subreddit feeds support Hot, New and Top — choosing Relevance or Most Comments for a subreddit falls back to Hot (the feed has no such order), and the run log says so.",
            "default": "hot"
          },
          "time": {
            "title": "🕒 Time Filter",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year",
              "all"
            ],
            "type": "string",
            "description": "Restrict results to a time window: Top sort on subreddit feeds, and post search with Relevance, Top or Comments sort. Comment search is not time-windowed.",
            "default": "all"
          },
          "includeNSFW": {
            "title": "🔞 Include NSFW",
            "type": "boolean",
            "description": "Include posts and communities marked as NSFW (18+).",
            "default": false
          },
          "postDateLimit": {
            "title": "📅 Post Date Limit",
            "type": "string",
            "description": "Skip posts older than this ISO-8601 date (e.g. \"2024-01-01\"). Applies to posts from feeds, profiles, direct URLs, and enriched post searches. Search posts whose date cannot be retrieved are omitted when a date filter is set. Leave blank for no date limit."
          },
          "maxComments": {
            "title": "💬 Max Comments Per Post",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of comments to collect from each post page.",
            "default": 200
          },
          "includeCollapsed": {
            "title": "💬 Include Collapsed Comments",
            "type": "boolean",
            "description": "Expand and include comments that are initially collapsed (controversial or low-score). Enables deeper thread coverage, up to the comment and depth limits you set.",
            "default": true
          },
          "commentDepth": {
            "title": "🌳 Comment Depth",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum reply nesting depth to collect (1 = top-level only).",
            "default": 10
          },
          "skipComments": {
            "title": "⏭️ Skip Comments",
            "type": "boolean",
            "description": "Do not collect comments from post pages — output posts only. A direct post URL in Start URLs is always read in full: the post itself and its comment thread.",
            "default": false
          },
          "deduplicateEmails": {
            "title": "Unique Emails",
            "type": "boolean",
            "description": "Return each email address only once per run. A record containing only addresses already returned is skipped and is not billed as a result. Disable to retain every matching source record.",
            "default": true
          },
          "emailDomains": {
            "title": "Include Email Domains",
            "type": "array",
            "description": "Optional domains, such as agency.com or gmail.com (one per line; comma-separated also works). A name without its ending, such as gmail, matches that provider on any ending (gmail.com, gmail.co.uk). Only addresses at these domains are returned. Leave empty for all domains.",
            "items": {
              "type": "string"
            }
          },
          "excludeEmailDomains": {
            "title": "Exclude Email Domains",
            "type": "array",
            "description": "Optional exact domains to exclude, such as gmail.com. Exclusions take precedence over included domains.",
            "items": {
              "type": "string"
            }
          },
          "incremental": {
            "title": "♻️ Return Only New or Changed Records",
            "type": "boolean",
            "description": "Remember successfully delivered records between runs for this account and these sources. Unchanged records are skipped before billing. New and changed records include changeType. Narrowing dates or reducing result limits does not delete saved history.",
            "default": false
          },
          "stateKey": {
            "title": "Tracking Group",
            "type": "string",
            "description": "Optional name to keep separate incremental histories for the same sources, for example one per workflow. Changing this starts a separate history."
          },
          "descriptionFormat": {
            "title": "📄 Description Format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Controls which body/description fields are included in output. \"all\" emits text + HTML + markdown variants.",
            "default": "all"
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude Empty Fields",
            "type": "boolean",
            "description": "Strip null and empty fields from output records to reduce payload size.",
            "default": false
          },
          "sentiment": {
            "title": "💬 Sentiment Analysis",
            "type": "boolean",
            "description": "Score each post and comment for sentiment — adds a `sentiment` field with a numeric score, a label (positive / negative / neutral), and a confidence value. Uses a fast lexicon heuristic.",
            "default": false
          },
          "includeRunMetadata": {
            "title": "📋 Include Run Metadata",
            "type": "boolean",
            "description": "Append one additional billed dataset record with the run ID, timing, counts and coverage flags. It is marked itemType=\"runMetadata\"; filter on itemType to exclude it from contact exports. Off by default.",
            "default": false
          },
          "appConnector": {
            "title": "Send results to Notion (or another connected app)",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your scraped Reddit results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog."
          },
          "maxResults": {
            "title": "💯 Max Results (alias)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Alias for Max Items: maximum total records to save across all sources. When both limits are supplied, this value takes precedence. Set to 0 for the actor's supported maximum."
          },
          "query": {
            "title": "🔍 Search Term(s)",
            "type": "string",
            "description": "Reddit search keywords. This is a single-term alias for Search Terms."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}