{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Data Engine for Claude (MCP)",
    "description": "The dedicated data Actor behind the Reddit Research Claude connector. Search Reddit,\nbrowse subreddits, pull posts with comments, and look up user profiles, reserved\ncapacity so Claude's requests never queue behind bulk scraping jobs.",
    "version": "0.0",
    "x-build-id": "TkvpbT22T3UN1CcH3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/practicaltools~reddit-claude-connector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-practicaltools-reddit-claude-connector",
        "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/practicaltools~reddit-claude-connector/runs": {
      "post": {
        "operationId": "runs-sync-practicaltools-reddit-claude-connector",
        "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/practicaltools~reddit-claude-connector/run-sync": {
      "post": {
        "operationId": "run-sync-practicaltools-reddit-claude-connector",
        "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 directly. Supports three URL types:\n• Subreddit (e.g. reddit.com/r/python/) — scrapes the subreddit feed\n• Post (e.g. reddit.com/r/python/comments/abc123/) — fetches that post and its comments\n• User (e.g. reddit.com/user/someuser/) — fetches the user profile and their recent posts\n\nTip: combine with Search Queries to search within a specific subreddit instead of globally.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "pattern": "^(https?:\\/\\/)?(www\\.)?reddit\\.com\\/.+$",
                  "description": "A valid Reddit URL."
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "searches": {
            "title": "Search Queries",
            "type": "array",
            "description": "Keywords or phrases to search for on Reddit. Each query runs independently and returns up to Max Items results.\n\nTip: wrap a query in quotes for exact phrase matching — e.g. '\"web scraping\"' will only match that exact phrase, while 'web scraping' matches posts containing both words anywhere.\n\nWhat gets searched depends on the search type flags below. If you also provide a subreddit in Start URLs, the search is scoped to that subreddit. Otherwise it searches all of Reddit.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "hot",
              "new",
              "top",
              "comments",
              "controversial",
              "rising"
            ],
            "type": "string",
            "description": "How to order results.\n\nFor search queries: relevance (default) gives the best matches; new/top/hot/comments also work.\nFor subreddit feeds: hot/new/top/controversial/rising. If you pick 'relevance' with a subreddit feed, it falls back to hot.\n\nrelevance and comments are only valid for searches, not subreddit feeds.",
            "default": "relevance"
          },
          "time": {
            "title": "Time Filter",
            "enum": [
              "all",
              "day",
              "hour",
              "month",
              "week",
              "year"
            ],
            "type": "string",
            "description": "Limits results to posts created within the selected time window. Applies to both subreddit feeds and search queries. Use 'all' to include posts from any time.",
            "default": "all"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of results per job. Each search query, subreddit, or URL counts as a separate job, so total output can exceed this number when you have multiple inputs.\n\nExample: 2 search queries × maxItems 25 = up to 50 posts total.",
            "default": 25
          },
          "includeNSFW": {
            "title": "Include NSFW",
            "type": "boolean",
            "description": "Include NSFW (Not Safe For Work) content.",
            "default": false
          },
          "skipComments": {
            "title": "Skip Comments (for direct post URLs)",
            "type": "boolean",
            "description": "When scraping a direct post URL, comments are fetched by default. Enable this to get only the post metadata without its comments. Does not affect the 'Fetch Comments for Each Post' option.",
            "default": false
          },
          "skipUserPosts": {
            "title": "Skip User Posts",
            "type": "boolean",
            "description": "When scraping a user profile, recent posts are fetched by default alongside profile info. Enable this to get only the profile metadata.",
            "default": false
          },
          "skipCommunity": {
            "title": "Skip Community Info",
            "type": "boolean",
            "description": "When scraping a subreddit feed, community metadata (member count, description, etc.) is fetched alongside posts. Enable this to skip that extra request and get only posts.",
            "default": true
          },
          "ignorestartUrls": {
            "title": "Ignore Start URLs",
            "type": "boolean",
            "description": "Forces search-only mode — Start URLs are ignored even if provided. Useful if you have URLs saved in your input but want to run a search-only job without deleting them.",
            "default": false
          },
          "searchPosts": {
            "title": "Search Posts",
            "type": "boolean",
            "description": "Find posts matching the search keyword. Returns post objects with title, body, upvotes, and comment count. On by default — disable if you only want comments, communities, or users.",
            "default": true
          },
          "searchComments": {
            "title": "Search Comments",
            "type": "boolean",
            "description": "Find comments matching the search keyword. Works by fetching posts that match the keyword and then filtering their comments — this uses more API calls than post search.",
            "default": false
          },
          "fetchPostComments": {
            "title": "Fetch Comments for Each Post",
            "type": "boolean",
            "description": "When enabled, each post returned from a subreddit or keyword search will include a 'comments' array with its top-level comments. Significantly increases API usage — one extra request per post.",
            "default": false
          },
          "searchCommunities": {
            "title": "Search Communities",
            "type": "boolean",
            "description": "Find subreddits whose name or description matches the keyword. Returns community objects with member count, description, and URL.",
            "default": false
          },
          "searchUsers": {
            "title": "Search Users",
            "type": "boolean",
            "description": "Find Reddit user accounts matching the keyword. Returns user objects with karma, profile info, and account age.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}