{
  "openapi": "3.1.0",
  "info": {
    "title": "Redditapis API",
    "version": "1.0.0",
    "description": "HTTP API to read from and write to Reddit over plain HTTP with Bearer auth and JSON, no OAuth. Fetch subreddit posts, search posts/communities/comments/media/users, read post comment trees and user profiles, log in to obtain session cookies, then comment, vote, update a profile, and send DMs. Also manage live monitors that watch subreddits for matching posts and push them to a webhook. Pay per call: GET reads $0.0015, vote $0.005, writes (login, comment, profile) $0.012, DM actions $0.025, account reads and feedback reports free, and monitoring is a flat monthly plan (management calls are free, no per-call charge).",
    "termsOfService": "https://www.redditapis.com/terms-of-service",
    "contact": {
      "name": "Redditapis",
      "url": "https://www.redditapis.com"
    }
  },
  "servers": [
    {
      "url": "https://api.redditapis.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Listings & Search",
      "description": "Subreddit post listings and full-text search across posts, communities, comments, media, and users."
    },
    {
      "name": "Posts",
      "description": "Single post details and full comment trees."
    },
    {
      "name": "Users",
      "description": "Public user profiles and recent comments."
    },
    {
      "name": "Auth",
      "description": "Log in with a username + password to obtain the session cookies used by write, vote, profile, and DM actions."
    },
    {
      "name": "Write",
      "description": "Post comments and cast votes on behalf of a logged-in account."
    },
    {
      "name": "Profile",
      "description": "Update the logged-in account's bio, display name, avatar, and banner."
    },
    {
      "name": "Direct Messages",
      "description": "Send DMs and read the logged-in account's DM threads and messages."
    },
    {
      "name": "Account",
      "description": "Read your account balance, usage, and payment history. Free."
    },
    {
      "name": "Feedback",
      "description": "Send a bug, idea or missing-capability report to the RedditAPIs team and read its status later. Built for AI agents: the official MCP server drafts reports locally and sends them only after the user reviews them. Free."
    },
    {
      "name": "Monitoring",
      "description": "Manage monitors that watch subreddits, or all of Reddit at once, for matching posts and push them to a webhook, plus register/test/delete webhooks and read delivery history. Billed as a flat monthly plan, not per call, and every call here is free. Every account also holds a free entitlement: one all-of-Reddit post watch at a 60s cadence, up to 10,000 deliveries a day, with no card. Naming a subreddit, matching comments, a faster cadence and additional watches require a paid plan."
    }
  ],
  "paths": {
    "/api/reddit/posts": {
      "get": {
        "operationId": "reddit-posts",
        "summary": "Subreddit Posts",
        "description": "Fetch posts from a subreddit. Supports every Reddit sort tab: new, hot, top, rising, controversial, best. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "subreddit",
            "in": "query",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | hot | top | rising | controversial | best",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "author": {
                            "type": "string"
                          },
                          "author_info": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "permalink": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "link_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "subreddit": {
                            "type": "string"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "comments": {
                            "type": "integer"
                          },
                          "upvote_ratio": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "over_18": {
                            "type": "boolean"
                          },
                          "stickied": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "archived": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "spoiler": {
                            "type": "boolean"
                          },
                          "is_self": {
                            "type": "boolean"
                          },
                          "is_crosspost": {
                            "type": "boolean"
                          },
                          "crosspost_origin": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "link_flair_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "link_flair_template_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_utc": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "created": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_video": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "video": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "is_gallery": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "gallery_images": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "preview_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "caption": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    },
                    "before": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/top": {
      "get": {
        "operationId": "reddit-sub-top",
        "summary": "Top Posts",
        "description": "Top posts of a subreddit for a timeframe. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "day | week (default) | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "author": {
                            "type": "string"
                          },
                          "author_info": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "permalink": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "link_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "subreddit": {
                            "type": "string"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "comments": {
                            "type": "integer"
                          },
                          "upvote_ratio": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "over_18": {
                            "type": "boolean"
                          },
                          "stickied": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "archived": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "spoiler": {
                            "type": "boolean"
                          },
                          "is_self": {
                            "type": "boolean"
                          },
                          "is_crosspost": {
                            "type": "boolean"
                          },
                          "crosspost_origin": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "link_flair_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "link_flair_template_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_utc": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "created": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_video": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "video": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "is_gallery": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "gallery_images": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "preview_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "caption": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/comments": {
      "get": {
        "operationId": "reddit-sub-comments",
        "summary": "Subreddit Comment Stream",
        "description": "Stream the newest comments across an entire subreddit (Reddit's /r/<name>/comments feed), not one post's thread. Poll it to catch every new comment in a community. Same comment shape as GET /api/reddit/user/{name}/comments. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/about": {
      "get": {
        "operationId": "reddit-sub-about",
        "summary": "Subreddit About",
        "description": "Fetch a subreddit's public metadata: title, public description, subscriber count, active-user count, creation date, type, and NSFW flag. Returns a single object, not a list. The query form GET /api/reddit/subreddit?name= returns the same thing at the same price. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "fullname": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "display_name_prefixed": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "public_description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subscribers": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "active_user_count": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "weekly_visitors": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "weekly_contributions": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "created_utc": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "created": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "over_18": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "subreddit_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lang": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "icon_img": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "banner_img": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/rules": {
      "get": {
        "operationId": "reddit-sub-rules",
        "summary": "Subreddit Rules",
        "description": "Fetch a subreddit's posting rules (Reddit's /r/<name>/about/rules feed): each rule's name, description, what it applies to (posts, comments, or all), its violation reason, priority, and creation date, plus Reddit's site-wide rules. Returns a `rules` list and a `site_rules` string list. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "site_rules": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/can-post": {
      "get": {
        "operationId": "reddit-sub-can-post",
        "summary": "Can I Post",
        "description": "Check before posting whether a post in this subreddit can go through. Returns `allowed` (true, false or \"unknown\"), `reasons` (each with a `code` such as banned, private, restricted_approved_only, archived, submission_type, flair_required, title_rule, body_rule, domain_blocked, low_karma_hint, new_account_hint, email_unverified, and a readable `detail`), the subreddit's posting `requirements` and post `rules`, and, when you send your Reddit session in the x-reddit-session and x-reddit-loid headers, the `account` facts used (karma, account age, email verified, banned or approved here). It never answers true on a read that failed, and karma and age only ever produce hints, because subreddits do not publish their AutoModerator thresholds. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix), 1 to 21 letters, digits or underscores. Any other name is a 400 INVALID_PARAM.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/flairs": {
      "get": {
        "operationId": "reddit-sub-flairs",
        "summary": "Subreddit Post Flairs",
        "description": "List a subreddit's post (link) flair templates, so you can pass a flair to POST /api/reddit/submit. Each template has `id` (send it as flair_id), `text`, `editable` (when true you may also send your own flair_text), `type` (text or richtext), `background_color`, `text_color`, `css_class`, `mod_only` (moderators only; refused for everyone else at submit time), `max_emojis`, `allowable_content` and `richtext`. Returns `subreddit`, `flairs` and `count`; a subreddit with no post flairs returns an empty list. Reddit serves this list only to signed-in accounts, so the read is always made as a session: your x-reddit-session and x-reddit-loid headers when sent, otherwise your stored Reddit session (POST /api/reddit/session). With neither, the call answers 503 SESSION_REQUIRED before Reddit is asked and is not charged. Read as a session, a moderator gets every template; any other account gets the templates Reddit offers it on its submit page (the ones it can post with), listed with mod_only false and null for fields Reddit does not send. A subreddit that does not exist is a 404, charged like any Reddit refusal (without any session the call is the unbilled 503 instead); 403 PERMISSION_DENIED means Reddit refused this account on this subreddit and is charged like any Reddit refusal. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix), 1 to 21 letters, digits or underscores. Any other name is a 400 INVALID_PARAM.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-session",
            "in": "header",
            "required": false,
            "description": "Your `reddit_session` cookie, to read the flairs as your account. Optional: without it the read uses your stored session, or answers the unbilled 503 SESSION_REQUIRED when none is connected.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-loid",
            "in": "header",
            "required": false,
            "description": "Your `loid` cookie, sent alongside x-reddit-session.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subreddit": {
                      "type": "string"
                    },
                    "flairs": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/moderators": {
      "get": {
        "operationId": "reddit-sub-moderators",
        "summary": "Subreddit Moderators",
        "description": "Fetch a subreddit's moderator team by name (Reddit's /r/<name>/about/moderators feed): each moderator's username, id, mod permissions, flair text, and the time they were added. Returns a `moderators` list. Reddit lists moderators to signed-in accounts only, so send your session as x-reddit-session and x-reddit-loid; without it the call answers 503 SESSION_REQUIRED and is not charged. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-session",
            "in": "header",
            "required": false,
            "description": "Your `reddit_session` cookie from POST /api/reddit/login. Reddit lists moderators to signed-in accounts only, so without it the call answers 503 SESSION_REQUIRED (not charged).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-loid",
            "in": "header",
            "required": false,
            "description": "Your `loid` cookie from POST /api/reddit/login, sent alongside x-reddit-session.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "moderators": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/sub/{name}/wiki/{page}": {
      "get": {
        "operationId": "reddit-sub-wiki",
        "summary": "Subreddit Wiki Page",
        "description": "Fetch a subreddit's wiki page by name and page (Reddit's /r/<name>/wiki/<page> feed): the page's markdown and HTML content, a may-revise flag, and the last revision's metadata (id, timestamp, author, and reason). Returns a single object, not a list. The page may be multi-segment, for example index, rules, or config/sidebar. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Subreddit name (no r/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "path",
            "required": true,
            "description": "Wiki page name (e.g. index, rules). May be multi-segment like config/sidebar.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "string"
                    },
                    "content_md": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "content_html": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revision_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revision_date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "revision_date_utc": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "revised_by": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "may_revise": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/subreddits/popular": {
      "get": {
        "operationId": "reddit-subreddits-popular",
        "summary": "Popular Subreddits",
        "description": "Browse the most-subscribed, trending subreddits right now, no keyword needed. Returns a `subreddits` list (same per-item shape as GET /api/reddit/sub/{name}/about) plus an `after` cursor. Community discovery: complements /search/communities, which SEARCHES by keyword, by BROWSING what is popular. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_details",
            "in": "query",
            "required": false,
            "description": "true = fill `created` for the first 10 subreddits, one extra page read each (at most 3 at a time, inside the request's time budget). Adds meta.details_filled and meta.details_cap. A failed per-item read leaves that item's field null. Default false: one read. Any value other than true or false is a 400.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subreddits": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/subreddits/new": {
      "get": {
        "operationId": "reddit-subreddits-new",
        "summary": "New Subreddits",
        "description": "Browse the newest subreddits, the communities most recently created, no keyword needed. Returns a `subreddits` list (same per-item shape as GET /api/reddit/sub/{name}/about) plus an `after` cursor. Community discovery: complements /search/communities, which SEARCHES by keyword, by BROWSING what is new. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_details",
            "in": "query",
            "required": false,
            "description": "true = fill `created` for the first 10 subreddits, one extra page read each (at most 3 at a time, inside the request's time budget). Adds meta.details_filled and meta.details_cap. A failed per-item read leaves that item's field null. Default false: one read. Any value other than true or false is a 400.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subreddits": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/subreddits/default": {
      "get": {
        "operationId": "reddit-subreddits-default",
        "summary": "Default Subreddits",
        "description": "Browse Reddit's default front-page set of subreddits, no keyword needed. Returns a `subreddits` list (same per-item shape as GET /api/reddit/sub/{name}/about) plus an `after` cursor. Community discovery: complements /search/communities, which SEARCHES by keyword, by BROWSING the default set. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_details",
            "in": "query",
            "required": false,
            "description": "true = fill `created` for the first 10 subreddits, one extra page read each (at most 3 at a time, inside the request's time budget). Adds meta.details_filled and meta.details_cap. A failed per-item read leaves that item's field null. Default false: one read. Any value other than true or false is a 400.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subreddits": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search": {
      "get": {
        "operationId": "reddit-search",
        "summary": "Search Posts",
        "description": "Full-text post search, optionally scoped to a subreddit. Advanced filters (score, comments, media, flags) are applied to the returned page and add a `meta` block (fetched / returned / filtered_out); paginate with `after` to filter more. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subreddit",
            "in": "query",
            "required": false,
            "description": "Restrict to a subreddit",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance | new | hot | top | comments",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_score",
            "in": "query",
            "required": false,
            "description": "Keep only posts with score >= this (applied to the returned page)",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_score",
            "in": "query",
            "required": false,
            "description": "Keep only posts with score <= this",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "min_comments",
            "in": "query",
            "required": false,
            "description": "Keep only posts with comment count >= this",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_comments",
            "in": "query",
            "required": false,
            "description": "Keep only posts with comment count <= this",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "is_video",
            "in": "query",
            "required": false,
            "description": "true = only video posts, false = only non-video",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "is_self",
            "in": "query",
            "required": false,
            "description": "true = only self/text posts, false = only link posts",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "over_18",
            "in": "query",
            "required": false,
            "description": "Filter the page by NSFW flag (distinct from nsfw, which controls inclusion in the search)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "locked",
            "in": "query",
            "required": false,
            "description": "Filter by the locked flag (true/false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stickied",
            "in": "query",
            "required": false,
            "description": "Filter by the stickied flag (true/false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "spoiler",
            "in": "query",
            "required": false,
            "description": "Filter by the spoiler flag (true/false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "contest_mode",
            "in": "query",
            "required": false,
            "description": "Filter by the contest_mode flag (true/false)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sort_type",
            "in": "query",
            "required": false,
            "description": "Re-sort the filtered page (desc): score | num_comments | created",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_bodies",
            "in": "query",
            "required": false,
            "description": "true to also read the post body (text) of up to 25 self posts the standard fill could not reach. No extra charge.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "author": {
                            "type": "string"
                          },
                          "author_info": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "permalink": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "link_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "subreddit": {
                            "type": "string"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "comments": {
                            "type": "integer"
                          },
                          "upvote_ratio": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "over_18": {
                            "type": "boolean"
                          },
                          "stickied": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "archived": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "spoiler": {
                            "type": "boolean"
                          },
                          "is_self": {
                            "type": "boolean"
                          },
                          "is_crosspost": {
                            "type": "boolean"
                          },
                          "crosspost_origin": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "link_flair_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "link_flair_template_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_utc": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "created": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_video": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "video": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "is_gallery": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "gallery_images": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "preview_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "caption": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search/communities": {
      "get": {
        "operationId": "reddit-search-communities",
        "summary": "Search Communities",
        "description": "Search subreddits (communities) by name and topic. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "communities": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/typeahead": {
      "get": {
        "operationId": "reddit-typeahead",
        "summary": "Typeahead",
        "description": "Search-as-you-type suggestions for a short prefix. Without `sub`, returns up to `limit` SUBREDDIT suggestions (`subreddits`: name, display_name_prefixed, title, icon_url, subscribers, over_18, url, match). With `sub`, returns up to `limit` POSTS in that subreddit whose titles match (`posts`: id, fullname, title, permalink, url, subreddit, score, num_comments, over_18, created_utc, created, match). Rows are ranked prefix, then contains, then related, and each row's `match` says which. No cursor: a typeahead returns one short list. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The prefix typed so far, 1-100 characters. Without `sub`, a leading r/ is ignored.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sub",
            "in": "query",
            "required": false,
            "description": "Subreddit name (no r/ prefix). Present: suggest posts in this subreddit by title. Absent: suggest subreddits.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Suggestions to return, default 8. Values outside 1-20 are clamped to that range.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search/comments": {
      "get": {
        "operationId": "reddit-search-comments",
        "summary": "Search Comments",
        "description": "Search Reddit by COMMENT text. Reddit matches against comments and returns the PARENT POSTS, so results are posts whose discussion mentions your query. Surfaces threads plain post search misses. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance | new | top | comments",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search/comments/deep": {
      "get": {
        "operationId": "reddit-search-comments-deep",
        "summary": "Deep Comment Search",
        "description": "Genuine comment search. Takes the parent posts from comment search, fetches each post's comment tree, and returns the ACTUAL comments whose body matches your query, with body, score, author, a comment-deep permalink, and the parent post. Premium: one comment-search read plus up to `limit` comment-tree reads. Best-effort: a deleted or deep-tree comment may be missed (meta.truncated flags a depth-limited tree). Cost: $0.02 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.02,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance | new | top | comments",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of parent POSTS to expand, 1-25 (default 5). Each is one comment-tree fetch.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_comments",
            "in": "query",
            "required": false,
            "description": "Optional cap on comments returned (highest-scored kept). meta.capped flags a trim.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "description": "Set to 'author' for the research mode: return the distinct PEOPLE who mentioned the query (ranked by matching-comment count) instead of a flat comment list.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_authors",
            "in": "query",
            "required": false,
            "description": "Only with group_by=author. Optional cap on people returned (most prolific first). meta.authors_capped flags a trim.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "authors": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "meta": {
                      "type": "object"
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search/media": {
      "get": {
        "operationId": "reddit-search-media",
        "summary": "Search Media",
        "description": "Search posts and return only those with image, video, or gallery media. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "all (default) | image | video | gallery",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance | new | hot | top | comments",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Raw search posts to scan before media filtering, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "filtered_from": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "fetched": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/search/users": {
      "get": {
        "operationId": "reddit-search-users",
        "summary": "Search Users",
        "description": "Search users by username substring. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query (username substring match)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nsfw",
            "in": "query",
            "required": false,
            "description": "true = include NSFW results (Safe Search off)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_details",
            "in": "query",
            "required": false,
            "description": "true = fill `link_karma`, `comment_karma` and `created` for the first 10 users, one extra page read each (at most 3 at a time, inside the request's time budget). Adds meta.details_filled and meta.details_cap. A failed per-item read leaves that item's fields null. Default false: one read. Any value other than true or false is a 400.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/post/{id}": {
      "get": {
        "operationId": "reddit-post-by-id",
        "summary": "Post by ID",
        "description": "Fetch a single post's details by its Reddit id. The query form GET /api/reddit/post?id= (or url=, post_id=) returns the same thing at the same price. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit post id (e.g. 1sgjld3)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/comments": {
      "get": {
        "operationId": "reddit-comments",
        "summary": "Post Comments",
        "description": "Fetch the full comment tree of a post. Name the post by exactly one of permalink, url, post_id or id. A URL is only parsed, never fetched; one on any other host than reddit.com or redd.it is a 400 NOT_A_REDDIT_URL. With none of the four the 400 carries code PERMALINK_REQUIRED and a hint naming them. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "permalink",
            "in": "query",
            "required": false,
            "description": "Post permalink (e.g. /r/X/comments/abc/title/). A full Reddit post URL is accepted here too. One of permalink, url, post_id or id is required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "A reddit.com, www.reddit.com, old.reddit.com or redd.it post URL (e.g. https://www.reddit.com/r/X/comments/abc/title/ or https://redd.it/abc).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "post_id",
            "in": "query",
            "required": false,
            "description": "Reddit post id (e.g. 1sgjld3); a t3_ prefix is optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Same as post_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of top-level comments, 1-500 (default 100). Reddit's own knob on the thread read.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "description": "Maximum reply depth to include, 1-10. Absent, Reddit's full tree is returned. depth=1 returns top-level comments only.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Comment ordering: confidence (Reddit's best), top, new, controversial, old or qa. Absent, Reddit's default for the thread.",
            "schema": {
              "type": "string",
              "enum": [
                "confidence",
                "top",
                "new",
                "controversial",
                "old",
                "qa"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "raw (default): Reddit's {kind, data} comment tree. normalized: the flat comment shape user_comments returns, plus depth and replies nested in the same shape; load-more stubs are dropped (has_more still reports them).",
            "schema": {
              "type": "string",
              "enum": [
                "raw",
                "normalized"
              ],
              "default": "raw"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/post/{id}/comments": {
      "get": {
        "operationId": "reddit-post-comments-by-id",
        "summary": "Post Comment Tree by ID",
        "description": "Fetch a post's full comment tree by its Reddit post id (no permalink needed). Returns the post plus native Reddit t1 comment nodes with nested replies. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit post id (e.g. 1sgjld3)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of top-level comments, 1-500 (default 100). Reddit's own knob on the thread read.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "description": "Maximum reply depth to include, 1-10. Absent, Reddit's full tree is returned. depth=1 returns top-level comments only.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Comment ordering: confidence (Reddit's best), top, new, controversial, old or qa. Absent, Reddit's default for the thread.",
            "schema": {
              "type": "string",
              "enum": [
                "confidence",
                "top",
                "new",
                "controversial",
                "old",
                "qa"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "raw (default): Reddit's {kind, data} comment tree. normalized: the flat comment shape user_comments returns, plus depth and replies nested in the same shape; load-more stubs are dropped (has_more still reports them).",
            "schema": {
              "type": "string",
              "enum": [
                "raw",
                "normalized"
              ],
              "default": "raw"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/post/{id}/duplicates": {
      "get": {
        "operationId": "reddit-post-duplicates",
        "summary": "Other Discussions of the Same Link",
        "description": "Every other Reddit submission of the URL this post links to, the list Reddit shows under \"other discussions\". Returns the original post, a `duplicates` list (up to 100 in one response) and `available`, the number Reddit returned. Reddit does not page this list, so there is no cursor. A text post links to itself, so it usually has none. Ordered by comment count by default. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit post id (e.g. 1sgjld3); a t3_ prefix is optional",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "num_comments (default, most discussed first) or new.",
            "schema": {
              "type": "string",
              "enum": [
                "num_comments",
                "new"
              ]
            }
          },
          {
            "name": "crossposts_only",
            "in": "query",
            "required": false,
            "description": "true returns only crossposts, of this post or of any other post that shares its link, and leaves out independent submissions of the same URL.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many duplicates to return, 1-100 (default 100). The endpoint reads the first 100 Reddit lists.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/post/{id}/comments/expanded": {
      "get": {
        "operationId": "reddit-post-comments-expanded",
        "summary": "Full Comment Tree, Collapsed Replies Expanded",
        "description": "The post and its comment tree with Reddit's collapsed replies read in. On a big thread Reddit sends part of the tree and hides the rest behind `kind: \"more\"` stubs (\"load more comments\" and \"continue this thread\"); this endpoint reads those stubs, up to 100 hidden comments per read, and puts the comments back where the stubs were, so the tree has the same shape as GET /api/reddit/post/{id}/comments. One call makes the thread read plus at most `max_expansions` expansion reads (default and maximum 9) and costs a flat $0.02. `expansion` reports what was read and how much is still collapsed (`complete`, `remaining_more_comments`, `stopped_reason`); a stub the call did not reach stays in the tree, and `after` is a cursor to read the rest on the next call. If an expansion read fails, the partial tree is returned and the call is not billed. Cost: $0.02 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.02,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit post id (e.g. 1sgjld3); a t3_ prefix is optional",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of top-level comments, 1-500 (default 100). Reddit's own knob on the thread read.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Comment ordering: confidence (Reddit's best), top, new, controversial, old or qa. Absent, Reddit's default for the thread.",
            "schema": {
              "type": "string",
              "enum": [
                "confidence",
                "top",
                "new",
                "controversial",
                "old",
                "qa"
              ]
            }
          },
          {
            "name": "max_expansions",
            "in": "query",
            "required": false,
            "description": "Most expansion reads this call may make, 1-9 (default 9). Each reads up to 100 hidden comments or one \"continue this thread\" branch. The price is the same at every value.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9,
              "default": 9
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "The `after` cursor from a previous answer for the same post: reads only the comments still collapsed, and `comments` holds just those (each top-level one with its parent_id). limit and sort come from the cursor and cannot be sent with it. Repeat until `after` is null.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/subreddits/batch": {
      "get": {
        "operationId": "reddit-subreddits-batch",
        "summary": "Batch Subreddit Lookup",
        "description": "Up to 100 subreddits in one call, by name. Returns a `subreddits` list (same per-item shape as GET /api/reddit/sub/{name}/about), `requested`, `returned`, and `missing`: the names Reddit did not return because the subreddit does not exist, is banned or is private. One read, standard read price. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "names",
            "in": "query",
            "required": true,
            "description": "Comma-separated subreddit names, without r/ (an r/ prefix is stripped), up to 100. Duplicates are ignored.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/users/batch": {
      "get": {
        "operationId": "reddit-users-batch",
        "summary": "Batch User Lookup by Account ID",
        "description": "Up to 100 Reddit accounts in one call, by t2_ account fullname: the `author_info.fullname` every post and comment result carries. Returns a `users` list (name, created, link, comment and total karma, profile image, NSFW profile flag), `requested`, `returned`, and `missing`: ids Reddit did not return (deleted, suspended or never existed). Reddit has no batch read by username; look one username up with GET /api/reddit/user/{name}. One read, standard read price. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "Comma-separated t2_ account fullnames (e.g. t2_16b0vi), up to 100. The t2_ prefix is required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/political-ads": {
      "get": {
        "operationId": "reddit-political-ads",
        "summary": "Political Ads Feed, Parsed",
        "description": "Reddit's political-ad transparency disclosures from r/RedditPoliticalAds, one per ad Reddit ran since 2019, parsed into fields: advertiser, EIN or FEC id, committee type, tax-exempt status, mailing address, `spend_usd` and `impressions` (each with the published band as `raw` plus numeric `min` and `max`, a bound left null when the post does not state it), `start_date`, `end_date`, geo, interest and subreddit targeting, links to the ad, `category` (the post flair, e.g. Issue Ads or Approved in Error) and the source `post`. Posts that are not disclosures are left out and counted in `skipped`. Paged with `after`. One read, standard read price. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default, most recent disclosure first), top or hot.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "top",
                "hot"
              ]
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Time window for sort=top.",
            "schema": {
              "type": "string",
              "enum": [
                "hour",
                "day",
                "week",
                "month",
                "year",
                "all"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/ads/search": {
      "get": {
        "operationId": "reddit-ads-search",
        "summary": "Reddit Ads Library Search",
        "description": "Search the promoted posts (ads) advertisers run on Reddit: who is advertising, with what title and creative, linking where, and in which subreddits. The index is built from the promoted posts that appear on the Reddit pages we read while serving API calls, so it grows every day and covers what Reddit shows in the communities and searches people read through the API. Each ad carries `id` (the t3_ fullname), `campaign_id`, `ad_type`, `advertiser` and `advertiser_id`, `title`, `outbound_url` (the landing page: origin, path and utm_* parameters only), `domain`, `call_to_action`, `post_type`, `language`, `placement`, `permalink`, `media_url`, `thumbnail_url`, `subreddits` (every subreddit it was seen in), `created_at`, `first_seen_at`, `last_seen_at` and `sightings`. Reddit's own house ads are left out. Newest first; paged with `cursor`. One read, the same price as a post search. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Text to find in the ad title or the advertiser name, up to 200 characters.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "advertiser",
            "in": "query",
            "required": false,
            "description": "Advertiser username, without u/ (a u/ prefix is stripped).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain",
            "in": "query",
            "required": false,
            "description": "Landing page hostname, e.g. shop.example.com.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subreddit",
            "in": "query",
            "required": false,
            "description": "Subreddit the ad was seen in, without r/ (an r/ prefix is stripped).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "campaign_id",
            "in": "query",
            "required": false,
            "description": "Reddit campaign id, as returned in `campaign_id`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date: only ads last seen on or after it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "description": "ISO 8601 date: only ads first seen on or before it.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Pagination cursor: the `after` value from the previous page, passed back exactly. Null `after` (has_more false) means there is no next page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/comments/{postId}": {
      "get": {
        "operationId": "reddit-comments-by-post-id",
        "summary": "Post Comment Tree by ID (alias)",
        "description": "Alias of GET /api/reddit/post/{postId}/comments — identical response shape and identical $0.0015 price. Provided so the three intuitive comment URL shapes all resolve: /comments?permalink=…, /post/{postId}/comments, and /comments/{postId}. Does not affect GET /api/reddit/comments?permalink=, which remains the permalink-based form. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "description": "Reddit post id (e.g. 1sgjld3)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of top-level comments, 1-500 (default 100). Reddit's own knob on the thread read.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "description": "Maximum reply depth to include, 1-10. Absent, Reddit's full tree is returned. depth=1 returns top-level comments only.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Comment ordering: confidence (Reddit's best), top, new, controversial, old or qa. Absent, Reddit's default for the thread.",
            "schema": {
              "type": "string",
              "enum": [
                "confidence",
                "top",
                "new",
                "controversial",
                "old",
                "qa"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "raw (default): Reddit's {kind, data} comment tree. normalized: the flat comment shape user_comments returns, plus depth and replies nested in the same shape; load-more stubs are dropped (has_more still reports them).",
            "schema": {
              "type": "string",
              "enum": [
                "raw",
                "normalized"
              ],
              "default": "raw"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/comment/{id}": {
      "get": {
        "operationId": "reddit-comment-by-id",
        "summary": "Comment by ID",
        "description": "Fetch a single comment by its Reddit comment id. Returns the native Reddit t1 comment node (body, author, score), or 404 if it does not exist. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit comment id, the t1 fullname suffix (e.g. abc123)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comment": {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/by_id/{fullnames}": {
      "get": {
        "operationId": "reddit-by-id",
        "summary": "Posts by ID (bulk)",
        "description": "Bulk-fetch posts by comma-separated t3_ fullnames in one call (up to 100), instead of a request per post. Hydrate ids you already have from a search or listing. Returns the same post shape as the listing endpoints. An unknown id is simply absent from the result. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "fullnames",
            "in": "path",
            "required": true,
            "description": "Comma-separated post fullnames, each a t3_ prefix (e.g. t3_abc123,t3_def456). Up to 100.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "meta": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/comments/verify": {
      "post": {
        "operationId": "reddit-comments-verify",
        "summary": "Batch Comment Verify",
        "description": "Check whether up to 100 comments are still live in a single call, instead of one call per comment. Every requested id comes back with an explicit status (live, deleted, removed, or not_found) — ids Reddit cannot resolve are backfilled as not_found rather than silently dropped. A POST only because 100 ids do not fit in a query string; it is a read, and bills at the flat $0.0015 read rate no matter the batch size. Cost: $0.0015 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "1-100 comment ids. Bare ids (\"n1abc2d\") and t1_-prefixed fullnames (\"t1_n1abc2d\") are both accepted and may be mixed."
                  }
                },
                "required": [
                  "ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "requested": {
                      "type": "integer"
                    },
                    "returned": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/user/{name}": {
      "get": {
        "operationId": "reddit-user",
        "summary": "User Profile",
        "description": "Fetch a user's public profile, karma, and account age. The query form GET /api/reddit/user?name= (or username=) returns the same thing at the same price. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "fullname": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_utc": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "link_karma": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "comment_karma": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "awardee_karma": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "awarder_karma": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "total_karma": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "total_karma_derived": {
                      "type": "boolean",
                      "description": "Present (true) when total_karma is post plus comment karma derived on a page-served read, the value the profile page itself shows; absent on a .json read."
                    },
                    "is_employee": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "is_mod": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "is_gold": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "verified": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "has_verified_email": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "icon_img": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "snoovatar_img": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subreddit": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "accept_followers": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/comments": {
      "get": {
        "operationId": "reddit-user-comments",
        "summary": "User Comments",
        "description": "Fetch a user's recent comments. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_parents",
            "in": "query",
            "required": false,
            "description": "true also fills parent_id on the first 10 comments when the page is served from the profile page, one extra read per comment inside the request's time budget; a failed read keeps parent_id null. meta.parents_filled reports the count. Default false.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/submitted": {
      "get": {
        "operationId": "reddit-user-submitted",
        "summary": "User Submitted Posts",
        "description": "Fetch a user's submitted POSTS (their post history, the sibling of their comment history). Same post shape as the subreddit listings. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | hot | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "author": {
                            "type": "string"
                          },
                          "author_info": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "permalink": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "link_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "subreddit": {
                            "type": "string"
                          },
                          "upvotes": {
                            "type": "integer"
                          },
                          "comments": {
                            "type": "integer"
                          },
                          "upvote_ratio": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "over_18": {
                            "type": "boolean"
                          },
                          "stickied": {
                            "type": "boolean"
                          },
                          "locked": {
                            "type": "boolean"
                          },
                          "archived": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "spoiler": {
                            "type": "boolean"
                          },
                          "is_self": {
                            "type": "boolean"
                          },
                          "is_crosspost": {
                            "type": "boolean"
                          },
                          "crosspost_origin": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "link_flair_text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "link_flair_template_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "created_utc": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "created": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_video": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "video": {
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "is_gallery": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "gallery_images": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "url": {
                                  "type": "string"
                                },
                                "preview_url": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "width": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "height": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "caption": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/upvoted": {
      "get": {
        "operationId": "reddit-user-upvoted",
        "summary": "User Upvoted",
        "description": "Fetch the posts and comments a Reddit account has UPVOTED. PRIVATE — Reddit only serves this to the account that owns it, so the session cookies must belong to `name` itself or the call fails with 403. Mixed listing: each item in the response is a post or a comment, tagged with a `kind` field. Get session cookies from POST /api/reddit/login first. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix) — must match the account the cookies belong to",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reddit_session",
            "in": "query",
            "required": true,
            "description": "Account session cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loid",
            "in": "query",
            "required": true,
            "description": "Account loid cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "csrf_token",
            "in": "query",
            "required": false,
            "description": "Account CSRF cookie, from POST /api/reddit/login. Not required for a read; harmless if included.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | hot | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/saved": {
      "get": {
        "operationId": "reddit-user-saved",
        "summary": "User Saved",
        "description": "Fetch the posts and comments a Reddit account has SAVED. PRIVATE — Reddit only serves this to the account that owns it, so the session cookies must belong to `name` itself or the call fails with 403. Mixed listing: each item in the response is a post or a comment, tagged with a `kind` field. Get session cookies from POST /api/reddit/login first. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix) — must match the account the cookies belong to",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reddit_session",
            "in": "query",
            "required": true,
            "description": "Account session cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loid",
            "in": "query",
            "required": true,
            "description": "Account loid cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "csrf_token",
            "in": "query",
            "required": false,
            "description": "Account CSRF cookie, from POST /api/reddit/login. Not required for a read; harmless if included.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | hot | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/hidden": {
      "get": {
        "operationId": "reddit-user-hidden",
        "summary": "User Hidden",
        "description": "Fetch the posts and comments a Reddit account has HIDDEN. PRIVATE — Reddit only serves this to the account that owns it, so the session cookies must belong to `name` itself or the call fails with 403. Mixed listing: each item in the response is a post or a comment, tagged with a `kind` field. Get session cookies from POST /api/reddit/login first. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix) — must match the account the cookies belong to",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reddit_session",
            "in": "query",
            "required": true,
            "description": "Account session cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loid",
            "in": "query",
            "required": true,
            "description": "Account loid cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "csrf_token",
            "in": "query",
            "required": false,
            "description": "Account CSRF cookie, from POST /api/reddit/login. Not required for a read; harmless if included.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | hot | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/gilded": {
      "get": {
        "operationId": "reddit-user-gilded",
        "summary": "User Gilded",
        "description": "Fetch the posts and comments a Reddit account has GILDED. PRIVATE — Reddit only serves this to the account that owns it, so the session cookies must belong to `name` itself or the call fails with 403. Mixed listing: each item in the response is a post or a comment, tagged with a `kind` field. Get session cookies from POST /api/reddit/login first. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix) — must match the account the cookies belong to",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reddit_session",
            "in": "query",
            "required": true,
            "description": "Account session cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "loid",
            "in": "query",
            "required": true,
            "description": "Account loid cookie, from POST /api/reddit/login",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "csrf_token",
            "in": "query",
            "required": false,
            "description": "Account CSRF cookie, from POST /api/reddit/login. Not required for a read; harmless if included.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "new (default) | top | hot | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results to return, 1-100 (default 25)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Pagination cursor. Pass back the `after` value from the previous response exactly as it was sent; it is opaque and carries your paging depth. When `after` comes back null there is no next page to request, but that does not always mean you have every item: Reddit often stops serving a busy listing long before it runs out, and it also caps any single listing at roughly 1000 items. The response says which happened in `listing_status` (complete, truncated, or unknown). Only `complete` means you have everything.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "after": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque pagination cursor; null when no next page is offered."
                    },
                    "exhausted_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Present only when `after` is null: why the listing stopped."
                    },
                    "listing_status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "complete | truncated | unknown. Only `complete` means you have every item."
                    },
                    "items_returned": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Running item count across the pages walked so far."
                    },
                    "final_page_items": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Items on the last page served."
                    },
                    "hint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Human-readable next step for this exhausted_reason."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/login": {
      "post": {
        "operationId": "reddit-login",
        "summary": "Reddit API Login",
        "description": "Log in with a Reddit username + password (and TOTP secret for 2FA accounts) to obtain the session cookies used by the write, vote, profile, and DM endpoints. Cost: $0.012 per call.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "description": "Reddit username or email"
                  },
                  "password": {
                    "type": "string",
                    "description": "Account password"
                  },
                  "totp_secret": {
                    "type": "string",
                    "description": "Base32 TOTP secret for accounts with 2FA enabled. Omit if 2FA is off."
                  },
                  "method": {
                    "type": "string",
                    "description": "http (default) | browser. Use browser for the most compatible write-session cookies."
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "locale": {
                    "type": "string",
                    "description": "BCP-47 tag for the browser context, e.g. de-DE. Match it to the proxy's country. Default en-US. Applies to the browser context: with method=browser always, and with the default method=http only if that login falls back to a browser (which it does when Reddit blocks the http transport before the login form)."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone for the browser context, e.g. Europe/Berlin. Match it to the proxy's country, or the account acts from your proxy's IP while reporting a New York clock. Casing and aliases are normalised (utc to UTC, europe/berlin to Europe/Berlin, GMT to UTC, Japan to Asia/Tokyo). A numeric offset such as +05:30 is not a timezone and is rejected. Default America/New_York. Applies to the browser context: with method=browser always, and with the default method=http only if that login falls back to a browser (which it does when Reddit blocks the http transport before the login form)."
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "username": {
                      "type": "string"
                    },
                    "link_karma": {
                      "type": "integer"
                    },
                    "comment_karma": {
                      "type": "integer"
                    },
                    "cookies": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "Session cookies to send on /comment, /vote and /dm."
                    },
                    "warning": {
                      "type": "string",
                      "description": "Present only when the login was sent without `proxy`: it used our shared IPs, which Reddit can flag."
                    },
                    "fallback_from": {
                      "type": "string",
                      "description": "\"http\" when the login fell back to the browser method."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Missing Bearer token (no API key on the request), OR two-factor required/invalid. With no code the fix is to add your API key. With code TWO_FACTOR_REQUIRED, 2FA is enabled but no totp_secret was supplied; TWO_FACTOR_INVALID means the secret could not produce a code. All are statements about YOUR request and are safe to act on. Terminal: do not retry unchanged. (An invalid, as opposed to missing, token is a 403.)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "description": "Reddit gave no reliable verdict on the credentials. Branch on the body `code`: UNKNOWN, UPSTREAM_ERROR and UPSTREAM_BLOCKED are our-side and transient, so retry (ideally with a different proxy IP) and these are NOT billed; CAPTCHA_REJECTED and CAPTCHA_SOLVER_FAILED are a login-captcha problem (usually the proxy IP's reCAPTCHA reputation), also NOT billed, retry with a different, ideally residential, IP; AUTH_FAILED is held here temporarily (Reddit blamed the credentials but currently returns the same message for correct ones) and is TERMINAL, so do not retry unchanged, check the credentials. UPSTREAM_ERROR carries Reddit's own reference in upstream_ref when it supplied one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/reddit/session": {
      "post": {
        "operationId": "reddit-session-connect",
        "summary": "Connect a Stored Reddit Session",
        "description": "Store your Reddit session server-side, encrypted (AES-256-GCM, a key held only by the API process), against your account. After this, any write (comment, submit, vote, DM, profile) that sends no cookies of its own acts as the stored session, so an agent never carries your cookies. The cookies are checked against Reddit before they are stored; a logged-out jar is refused. Free. Cost: Free per call.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reddit_session": {
                    "type": "string",
                    "description": "The reddit_session cookie, from POST /api/reddit/login or your own browser"
                  },
                  "loid": {
                    "type": "string",
                    "description": "The loid cookie"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "The csrf_token cookie. Store it too if you will vote, DM or edit the profile with the stored session: those writes need it."
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "The token_v2 cookie, when your session has one"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "reddit_session",
                  "loid"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      },
      "get": {
        "operationId": "reddit-session-status",
        "summary": "Stored Reddit Session Status",
        "description": "Whether a Reddit session is stored for your account: connected, the Reddit username, status (active or dead), when it was stored and last used. Never returns the cookies. Free. Cost: Free per call.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/session/delete": {
      "post": {
        "operationId": "reddit-session-disconnect",
        "summary": "Delete the Stored Reddit Session",
        "description": "Delete the stored Reddit session for your account, self-serve. Idempotent: 200 with deleted false when nothing was stored. Free. Cost: Free per call.",
        "tags": [
          "Auth"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/schedule": {
      "post": {
        "operationId": "reddit-schedule-create",
        "summary": "Schedule a Post or Comment",
        "description": "Schedule a post or a comment to be made at a later time. `request` is the body you would send to POST /api/reddit/submit (type post) or POST /api/reddit/comment (type comment), without cookies or a proxy: at `run_at` it is sent through that same route as your stored Reddit session (POST /api/reddit/session), so a session must be connected when you schedule and when it runs. `run_at` is an ISO 8601 timestamp with a time zone (or Unix seconds), from 60 seconds to 30 days ahead; due actions are picked up every 30 seconds and run one at a time. Scheduling is free. The post or comment is charged when it runs, at the live route's price ($0.012); a run that fails with an answer is not charged, and one whose outcome was never confirmed reports billed null. Returns 201 Created with `action` (id, type, status, run_at, request). Errors: 400 for a bad field (code names it), 400 SESSION_FIELDS_NOT_STORED for cookies or a proxy, 400 SESSION_NOT_CONNECTED, 409 SCHEDULE_LIMIT_REACHED at 100 waiting actions. Cost: Free per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "\"post\" or \"comment\""
                  },
                  "run_at": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "description": "When to run it: ISO 8601 with a time zone (2026-10-21T15:00:00Z) or Unix seconds; 60 seconds to 30 days ahead"
                  },
                  "request": {
                    "type": "object",
                    "description": "For a post: subreddit, kind (self, link or poll), title, and optionally text, url, options, duration, nsfw, spoiler, sendreplies, flair_id, flair_text, locale, timezone, fingerprint. For a comment: post_url, text, and optionally locale, timezone, fingerprint. Any other field, any cookie and proxy are refused."
                  }
                },
                "required": [
                  "type",
                  "run_at",
                  "request"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "object"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      },
      "get": {
        "operationId": "reddit-schedule-list",
        "summary": "List Scheduled Posts and Comments",
        "description": "Your scheduled actions, newest first: each with id, type, status (scheduled, running, succeeded, failed, cancelled), run_at, request, created_at, finished_at, result (what the write returned, when it succeeded), error (code, message and http_status, when it failed) and billed (true for a run that succeeded, false for one that failed with an answer or was cancelled, null when the outcome was never confirmed). Free. Cost: Free per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only actions in this status: scheduled, running, succeeded, failed or cancelled",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many to return, 1-100 (default 50)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "count": {
                      "type": "integer"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/schedule/cancel": {
      "post": {
        "operationId": "reddit-schedule-cancel",
        "summary": "Cancel a Scheduled Post or Comment",
        "description": "Cancel an action that has not run yet. Returns `cancelled` true and the action; for one that already ran or is running, `cancelled` false with its current status. A cancelled action never runs and is never charged. 404 for an id that is not yours. Free. Cost: Free per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The action id POST /api/reddit/schedule returned"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cancelled": {
                      "type": "boolean"
                    },
                    "action": {
                      "type": "object"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/comment": {
      "post": {
        "operationId": "reddit-comment",
        "summary": "Post Comment",
        "description": "Post a comment on any Reddit post. Plain text is rich-text encoded automatically. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.012 per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_url": {
                    "type": "string",
                    "description": "Any reddit.com post URL (new or old UI)"
                  },
                  "text": {
                    "type": "string",
                    "description": "Comment text — plain text is rich-text encoded automatically"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "Reddit token_v2 cookie"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "edgebucket": {
                    "type": "string",
                    "description": "edgebucket cookie"
                  },
                  "csv": {
                    "type": "string",
                    "description": "csv cookie"
                  },
                  "session_tracker": {
                    "type": "string",
                    "description": "session_tracker cookie"
                  },
                  "pc": {
                    "type": "string",
                    "description": "pc cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "locale": {
                    "type": "string",
                    "description": "BCP-47 tag for the browser context, e.g. de-DE. Match it to the proxy's country. Default en-US."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone for the browser context, e.g. Europe/Berlin. Match it to the proxy's country, or the account acts from your proxy's IP while reporting a New York clock. Casing and aliases are normalised (utc to UTC, europe/berlin to Europe/Berlin, GMT to UTC, Japan to Asia/Tokyo). A numeric offset such as +05:30 is not a timezone and is rejected. Default America/New_York."
                  }
                },
                "required": [
                  "post_url",
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/submit": {
      "post": {
        "operationId": "reddit-submit",
        "summary": "Create Post",
        "description": "Create a Reddit post as the authenticated caller. Serves kind \"self\" (text), \"link\", \"poll\", \"image\", \"video\" and \"videogif\". An unsupported kind is refused by NAME with a 400 rather than silently downgraded to a text post. For image and video you supply a URL we fetch: the media is uploaded to Reddit and the request is held open until Reddit confirms the post, so a media post behaves the same as every other kind. NOT YET VERIFIED END TO END against a real Reddit account: the route is unit-tested and the request shape is derived from the live router, but no post has been created through it, and an unverified write fails under YOUR account in a real subreddit. Talk to support before building on it. When Reddit will not accept the post until a captcha is solved, the answer is 422 CAPTCHA_REQUIRED: nothing was posted, retrying the same way will not help, and the call is not charged. Cost: $0.012 per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subreddit": {
                    "type": "string",
                    "description": "Target subreddit name, without the r/ prefix"
                  },
                  "kind": {
                    "type": "string",
                    "description": "Post kind: \"self\" for a text post, \"link\" for a URL post, \"poll\" for a poll, \"image\", \"video\" or \"videogif\" for a media post"
                  },
                  "title": {
                    "type": "string",
                    "description": "Post title"
                  },
                  "text": {
                    "type": "string",
                    "description": "Body text. Used when kind is \"self\", and optionally on a media post."
                  },
                  "url": {
                    "type": "string",
                    "description": "Target URL. Used when kind is \"link\". Not accepted on a media post: an image URL here would create a LINK post pointing at the image, which is a different thing from an image post."
                  },
                  "image_url": {
                    "type": "string",
                    "description": "Publicly readable https URL of the image. Required when kind is \"image\". We fetch it, so it must not need authentication. The Content-Type you serve decides the media type, so a URL with no file extension works."
                  },
                  "video_url": {
                    "type": "string",
                    "description": "Publicly readable https URL of the video. Required when kind is \"video\" or \"videogif\". Same fetch rules as image_url."
                  },
                  "video_poster_url": {
                    "type": "string",
                    "description": "Publicly readable https URL of a poster image for the video. REQUIRED when kind is \"video\" or \"videogif\": Reddit will not accept a video without one, and we do not invent a placeholder because it would be published under your name."
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Poll choices. Required when kind is \"poll\", at least two, distinct and non-empty. Reddit rules on the maximum, which is not enforced here."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Poll length in whole days. Required when kind is \"poll\". Reddit rules on the accepted range, which is not enforced here."
                  },
                  "nsfw": {
                    "type": "boolean",
                    "description": "Mark the post NSFW"
                  },
                  "spoiler": {
                    "type": "boolean",
                    "description": "Mark the post a spoiler"
                  },
                  "sendreplies": {
                    "type": "boolean",
                    "description": "Send reply notifications to the author inbox"
                  },
                  "flair_id": {
                    "type": "string",
                    "description": "Subreddit post flair template id; list them with GET /api/reddit/sub/{name}/flairs"
                  },
                  "flair_text": {
                    "type": "string",
                    "description": "Flair text, where the subreddit allows it"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "Reddit token_v2 cookie"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "edgebucket": {
                    "type": "string",
                    "description": "edgebucket cookie"
                  },
                  "csv": {
                    "type": "string",
                    "description": "csv cookie"
                  },
                  "session_tracker": {
                    "type": "string",
                    "description": "session_tracker cookie"
                  },
                  "pc": {
                    "type": "string",
                    "description": "pc cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "locale": {
                    "type": "string",
                    "description": "BCP-47 tag for the browser context, e.g. de-DE. Match it to the proxy's country. Default en-US."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone for the browser context, e.g. Europe/Berlin. Match it to the proxy's country, or the account acts from your proxy's IP while reporting a New York clock. Casing and aliases are normalised (utc to UTC, europe/berlin to Europe/Berlin, GMT to UTC, Japan to Asia/Tokyo). A numeric offset such as +05:30 is not a timezone and is rejected. Default America/New_York."
                  }
                },
                "required": [
                  "subreddit",
                  "kind",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/v2/comment": {
      "post": {
        "operationId": "reddit-comment-v2",
        "summary": "Post Comment v2",
        "description": "Post a comment via the v2 write path. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.012 per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "post_url": {
                    "type": "string",
                    "description": "Any reddit.com post URL"
                  },
                  "text": {
                    "type": "string",
                    "description": "Comment body (plain text)"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "Reddit token_v2 cookie"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "edgebucket": {
                    "type": "string",
                    "description": "edgebucket cookie"
                  },
                  "csv": {
                    "type": "string",
                    "description": "csv cookie"
                  },
                  "session_tracker": {
                    "type": "string",
                    "description": "session_tracker cookie"
                  },
                  "pc": {
                    "type": "string",
                    "description": "pc cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "post_url",
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/vote": {
      "post": {
        "operationId": "reddit-vote",
        "summary": "Vote",
        "description": "Cast or clear an up/down vote on a post or comment. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.005 per call.",
        "tags": [
          "Write"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.005,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "thing_id": {
                    "type": "string",
                    "description": "t3_xxx for a post, t1_xxx for a comment"
                  },
                  "direction": {
                    "type": "string",
                    "description": "up | down | none (clear existing vote)"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "Reddit token_v2 cookie"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "edgebucket": {
                    "type": "string",
                    "description": "edgebucket cookie"
                  },
                  "csv": {
                    "type": "string",
                    "description": "csv cookie"
                  },
                  "session_tracker": {
                    "type": "string",
                    "description": "session_tracker cookie"
                  },
                  "pc": {
                    "type": "string",
                    "description": "pc cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "thing_id",
                  "direction"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/profile/description": {
      "post": {
        "operationId": "reddit-profile-description",
        "summary": "Update Bio",
        "description": "Update the logged-in account's profile bio (publicDescription). Plain text, up to 200 characters. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.012 per call.",
        "tags": [
          "Profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "New bio — plain text, <= 200 chars"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "token_v2": {
                    "type": "string",
                    "description": "Reddit token_v2 cookie"
                  },
                  "edgebucket": {
                    "type": "string",
                    "description": "edgebucket cookie"
                  },
                  "csv": {
                    "type": "string",
                    "description": "csv cookie"
                  },
                  "session_tracker": {
                    "type": "string",
                    "description": "session_tracker cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "max_attempts": {
                    "type": "integer",
                    "default": 3,
                    "description": "Retry budget (default 3)"
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/profile/display-name": {
      "post": {
        "operationId": "reddit-profile-display-name",
        "summary": "Set Display Name",
        "description": "Set the profile display name (the human-readable name shown above the username). Does not change the username. Up to 90 characters. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.012 per call.",
        "tags": [
          "Profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "maxLength": 90,
                    "description": "New display name, <= 90 chars"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "max_attempts": {
                    "type": "integer",
                    "default": 3,
                    "description": "Retry budget (default 3)"
                  }
                },
                "required": [
                  "display_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/profile/avatar": {
      "post": {
        "operationId": "reddit-profile-avatar",
        "summary": "Upload Avatar / Banner",
        "description": "Upload a new avatar or banner for the logged-in account. Provide the image via URL, base64, or a server-local path (PNG/JPEG, auto-detected). Provide exactly one of image_url, image_base64, or image_path. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.012 per call.",
        "tags": [
          "Profile"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.012,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "image_url": {
                    "type": "string",
                    "description": "Publicly-fetchable image URL — the server downloads it"
                  },
                  "image_base64": {
                    "type": "string",
                    "description": "Base64-encoded image (with or without data:image/...;base64, prefix)"
                  },
                  "image_path": {
                    "type": "string",
                    "description": "Server-local path (rarely useful)"
                  },
                  "kind": {
                    "type": "string",
                    "description": "avatar (default) or banner"
                  },
                  "mimetype": {
                    "type": "string",
                    "description": "Hint (PNG / JPG) — auto-detected from bytes if omitted"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Filename to record (default avatar.png)"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  },
                  "max_attempts": {
                    "type": "integer",
                    "default": 3,
                    "description": "Retry budget (default 3)"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/dm": {
      "post": {
        "operationId": "reddit-dm-send",
        "summary": "Send DM",
        "description": "Send a direct message to a user. Provide either to_username or to_user_t2. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.025 per call.",
        "tags": [
          "Direct Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.025,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to_username": {
                    "type": "string",
                    "description": "Target username (resolved to t2_xxx). Provide this OR to_user_t2."
                  },
                  "to_user_t2": {
                    "type": "string",
                    "description": "Target t2_xxx ID directly (skips username lookup, ~300ms faster)."
                  },
                  "message": {
                    "type": "string",
                    "description": "Plain-text DM body"
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "message"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/dm/threads": {
      "post": {
        "operationId": "reddit-dm-threads",
        "summary": "List DM Threads",
        "description": "List the logged-in account's DM threads. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.025 per call.",
        "tags": [
          "Direct Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.025,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/dm/messages": {
      "post": {
        "operationId": "reddit-dm-messages",
        "summary": "Fetch Messages",
        "description": "Fetch the messages of a single DM thread. Session cookies are optional when a Reddit session is connected through POST /api/reddit/session: a call that sends none acts as the stored session, and cookies you do send always win. Cost: $0.025 per call.",
        "tags": [
          "Direct Messages"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.025,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "room_id": {
                    "type": "string",
                    "description": "Thread ID from /api/reddit/dm/threads (e.g. !hdsti...:reddit.com)"
                  },
                  "limit": {
                    "type": "integer",
                    "default": 50,
                    "maximum": 100,
                    "description": "Messages per page (default 50, max 100)"
                  },
                  "before": {
                    "type": "string",
                    "description": "Cursor from a previous response's next_cursor. Omit for the first (latest) page."
                  },
                  "reddit_session": {
                    "type": "string",
                    "description": "Account session cookie (from /api/reddit/login)"
                  },
                  "loid": {
                    "type": "string",
                    "description": "Account loid cookie (from /api/reddit/login)"
                  },
                  "csrf_token": {
                    "type": "string",
                    "description": "Reddit CSRF token cookie"
                  },
                  "proxy": {
                    "description": "Sticky IP for this account — match the proxy used for /api/reddit/login, and send it on every call for that account. Object { server, username?, password? } or a proxy URL string. A bare host:port is accepted and treated as http. Schemes: http, https, socks4, socks5, socks5h (browser-backed endpoints support http, https, socks5). Pinned across internal retries; omit to use our shared pool.",
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "server": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "password": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "server"
                        ]
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "room_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/account/me": {
      "get": {
        "operationId": "account-me",
        "summary": "My Account",
        "description": "Get your account info, current balance, and usage summary. Free — does not consume credits. Rate-limited to 30 requests/minute per API key. Cost: Free per call.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/account/payments": {
      "get": {
        "operationId": "account-payments",
        "summary": "Payment History",
        "description": "List your account's payment / top-up history. Free — does not consume credits. Cost: Free per call.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/feed": {
      "get": {
        "operationId": "reddit-feed",
        "summary": "Home Feed",
        "description": "Your own Reddit front page, read with YOUR session. Every other read on this API is served from our account pool, so the home feed has never been answerable: our accounts' feed is not yours. This one requires x-reddit-session and x-reddit-loid — without them there is no account whose feed this would be, and Reddit's default front page is a different feed belonging to nobody. For a public subreddit listing use GET /api/reddit/posts. Cost: $0.0015 per call.",
        "tags": [
          "Listings & Search"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "best (default) | hot | new | top | rising | controversial",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "Timeframe for sort=top/controversial: hour | day | week | month | year | all. Ignored for the other sorts.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-session",
            "in": "header",
            "required": true,
            "description": "REQUIRED here. Your `reddit_session` cookie from POST /api/reddit/login. This endpoint reads YOUR feed, so without it there is nothing to read.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-reddit-loid",
            "in": "header",
            "required": true,
            "description": "REQUIRED here. Your `loid` cookie from POST /api/reddit/login. Sent alongside x-reddit-session; a session without it is refused as incomplete.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/feedback": {
      "post": {
        "operationId": "feedback-create",
        "summary": "Send Feedback",
        "description": "Report a bug, an idea or a missing capability to the RedditAPIs team, typically sent by an AI agent (the redditapis-mcp server drafts reports locally and posts them only after the user reviews them). Free, does not consume credits. Rate-limited to 10 requests per minute per API key. Every rejection is a 400 whose body names the offending field (`{error:\"invalid_request\", field, message}`). Cost: Free per call.",
        "tags": [
          "Feedback"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "bug",
                      "idea",
                      "missing_capability"
                    ],
                    "description": "bug: a tool or endpoint misbehaved. idea: a change that would have made the task easier. missing_capability: something no endpoint provides."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "One specific line naming the endpoint or tool and the defect. 1 to 120 characters."
                  },
                  "details": {
                    "type": "string",
                    "maxLength": 8000,
                    "description": "What happened (observed vs expected), a minimal repro, and the evidence, optionally after a one-line summary of the goal. No quotes of the conversation. 1 to 8000 characters."
                  },
                  "area": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional. The endpoint or feature the report is about, e.g. \"posts/comments\" or \"monitoring\". At most 80 characters."
                  },
                  "evidence": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Optional identifiers only, never payloads: {tool, endpoint, status, request_id, client, mcp_version}. Must serialize to 4096 bytes or fewer."
                  },
                  "client": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Optional. The client that sent the report, e.g. \"claude-code/2.1.259 via redditapis-mcp@0.4.0\". At most 120 characters."
                  }
                },
                "required": [
                  "type",
                  "title",
                  "details"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      },
      "get": {
        "operationId": "feedback-list",
        "summary": "List Feedback",
        "description": "List the feedback reports this account has sent, newest first, with each one's current status. Use it to recover a lost id: the server id is returned only once, when a report is created, so this is the way back to a report whose id was not kept. It also answers \"did that report land\" and \"has the team looked at it yet\". Filter by status or type, and page with the cursor from a previous response. Free, never metered. An account that has filed nothing gets an empty list and a 200, not an error. Cost: Free per call.",
        "tags": [
          "Feedback"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Optional. Only reports in this state: new | triaged | shipped | declined. Omit for all.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "triaged",
                "shipped",
                "declined"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Optional. Only reports of this kind. Omit for all.",
            "schema": {
              "type": "string",
              "enum": [
                "bug",
                "idea",
                "missing_capability"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Optional. How many to return, 1-100 (default 25). Newest first.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Optional. The next_cursor from a previous response, to fetch the page after it. Keyset paging on (created_at, id), so a report filed while you page cannot make a row repeat or be skipped. A cursor this endpoint did not issue is a 400, never an empty page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/feedback/{id}": {
      "get": {
        "operationId": "feedback-get",
        "summary": "Feedback Status",
        "description": "Read the status of a feedback report this account sent earlier: new, triaged, shipped or declined, plus the team's response text if any. `updated_at` moves only when the team acts on the report. Free, does not consume credits. 404 for any id that is not on this account, including ids that are not UUIDs. Cost: Free per call.",
        "tags": [
          "Feedback"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The server id returned by POST /feedback (a UUID).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "area": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string"
                    },
                    "response": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "No feedback report with that id on this account (another account's report, a deleted report and a malformed id all answer 404 alike).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/monitor/add": {
      "post": {
        "operationId": "monitor-add",
        "summary": "Create Monitor",
        "description": "Create a monitor: subreddits to watch, or all of Reddit at once, plus an optional filter. Forward-looking only from creation (or from baseline_item_id). Every account has a free entitlement of one all-of-Reddit post watch at a 60s cadence, so no subscription is needed to create that monitor; naming a subreddit requires a paid plan and returns 402 subreddit_scope_requires_paid_plan otherwise. Requires a free monitor slot. Two separate limits apply: monitor slots, and how many DISTINCT subreddits the plan covers across all your monitors (the same subreddit named in two monitors counts once, because it is one poll stream). Returns 402 subscription_required, monitor_slots_exhausted, sitewide_slots_exhausted or distinct_subreddit_limit_reached, 501 sitewide_comment_monitoring_not_available for a sitewide comment monitor, or 400 subreddit_not_found for an unknown subreddit. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter_spec": {
                    "type": "object",
                    "description": "What this monitor watches for. A monitor with only `subreddit` is legal and common (\"everything in r/X\"). A monitor must be anchored by either `subreddit` or a keyword `q`: omit `subreddit` and set `q` to watch all of Reddit.",
                    "properties": {
                      "subreddit": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1,
                        "maxItems": 50,
                        "description": "Subreddits to watch, without the r/ prefix. 1-50. Omit entirely (and set q) to watch all of Reddit for a keyword."
                      },
                      "exclude_subreddits": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Subreddits to suppress, without the r/ prefix. SITEWIDE MONITORS ONLY: rejected with a field-level 400 when subreddit is also set, because a monitor that names its subreddits should drop the unwanted name from that list instead. Matched the same way as subreddit (r/Politics, /r/politics and politics are one entry). A delivery filter, not a cost lever: it changes what reaches you, never what is polled."
                      },
                      "q": {
                        "type": "string",
                        "description": "Keyword or phrase, case-insensitive, matched against the fields in search_in (default title and body). New monitors match it on whole words and as an exact phrase; see whole_words, match and stem."
                      },
                      "author": {
                        "type": "string",
                        "description": "Only match posts by this Reddit username (without u/)."
                      },
                      "exclude_terms": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Posts containing any of these terms are suppressed even if they otherwise match. Always matched as a phrase, on whole words when whole_words is true."
                      },
                      "domain": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Outbound link domains to watch for (e.g. example.com). Exact-or-subdomain match only; does not resolve shortened links."
                      },
                      "include_any": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "At least one of these terms must appear (OR match), on top of any q."
                      },
                      "include_all": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Every one of these terms must appear (AND match), on top of any q."
                      },
                      "search_in": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "title",
                            "body",
                            "url",
                            "permalink"
                          ]
                        },
                        "description": "Which fields keyword/term matching is scoped to. Default [title, body]. Links are searched only when you add url (a link's host and path, never its query string, and never a link to a Reddit thread) or permalink. A monitor created before whole-word matching (its filter_spec has no whole_words field) keeps its old default of [title, body, url]."
                      },
                      "whole_words": {
                        "type": "boolean",
                        "description": "true (the default for every new monitor) matches terms only as whole words: api does not match apis, rapid or therapist. false matches terms anywhere inside other words. A monitor created before this option existed has no whole_words field and keeps substring matching; send true to move it over. An update that omits whole_words keeps the monitor's current setting."
                      },
                      "match": {
                        "type": "string",
                        "enum": [
                          "phrase",
                          "all_words"
                        ],
                        "description": "phrase (default): the words of a term must appear together and in order. all_words: every word of the term must appear, in any order. Applies to q, include_any and include_all; exclude_terms are always phrases."
                      },
                      "stem": {
                        "type": "boolean",
                        "description": "Default false. true also matches simple English plural, -ed and -ing forms of each word (launch matches launches, launched and launching)."
                      },
                      "stream_since": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "readOnly": true,
                        "description": "Set by the server, never by you: when this monitor started watching each stream, keyed kind:subreddit. Items on a stream created before that moment are not delivered, so adding a subreddit or switching kind never replays a backlog. Any value you send is replaced."
                      },
                      "group": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Optional label to bundle multiple matches into one delivery instead of one per match."
                      },
                      "min_score": {
                        "type": "integer",
                        "description": "Only match posts with at least this many upvotes."
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "post",
                          "comment",
                          "both"
                        ],
                        "description": "What to watch: new posts (default), new comments, or both. Comment watching is plan-gated, and nsfw:false cannot be combined with comment or both."
                      },
                      "min_relevance": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100,
                        "description": "AI relevance floor, 0 to 100 (0 = off). Items scored below it are dropped; delivered items carry their score and a reason. Needs a keyword (q, include_any or include_all) to score against, and is available on the higher monitoring plans."
                      },
                      "nsfw": {
                        "type": "boolean",
                        "description": "Set false to EXCLUDE NSFW/over-18 posts. Omitted or true both mean NSFW is allowed through -- there is no exclude-by-default; you must explicitly pass false to filter it out."
                      }
                    }
                  },
                  "cadence_s": {
                    "type": "integer",
                    "description": "Requested poll interval in seconds. May only be slower than the plan tier's floor, never faster — a too-low value is silently clamped up."
                  },
                  "baseline_item_id": {
                    "type": "string",
                    "description": "A Reddit post fullname (e.g. t3_abc123) to start matching strictly after, instead of the moment of creation. A t3_ id is a starting point for posts only; a t1_ id is one for comments only. A bare post id or a Reddit post or comment URL is also accepted and stored as the matching fullname; any other value is refused with 400 invalid_baseline_item_id (such a value used to be stored as is and made the monitor skip every item). Until October 20, 2026 a monitor watching both posts and comments with a t3_ baseline delivered no comments at all; it now delivers new comments as well."
                  },
                  "webhook_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "description": "Webhooks (ids from Create Webhook) this monitor delivers to, up to 20. Omit to deliver to every active webhook on the account."
                  }
                },
                "required": [
                  "filter_spec"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/list": {
      "get": {
        "operationId": "monitor-list",
        "summary": "List Monitors",
        "description": "List every monitor on your account, plus a slots object ({used, total, tier}). Reading your own list never requires an active plan. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/monitor/update": {
      "post": {
        "operationId": "monitor-update",
        "summary": "Update Monitor",
        "description": "Pause/resume (active), re-cadence, or replace a monitor's filter. Passing filter_spec REPLACES the whole filter — it does not merge, so resupply every field you want kept, including subreddit. Returns 404 monitor_not_found if the id is not yours. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The monitor's id, from Create Monitor's response or List Monitors."
                  },
                  "filter_spec": {
                    "type": "object",
                    "description": "What this monitor watches for. A monitor with only `subreddit` is legal and common (\"everything in r/X\"). A monitor must be anchored by either `subreddit` or a keyword `q`: omit `subreddit` and set `q` to watch all of Reddit.",
                    "properties": {
                      "subreddit": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1,
                        "maxItems": 50,
                        "description": "Subreddits to watch, without the r/ prefix. 1-50. Omit entirely (and set q) to watch all of Reddit for a keyword."
                      },
                      "exclude_subreddits": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Subreddits to suppress, without the r/ prefix. SITEWIDE MONITORS ONLY: rejected with a field-level 400 when subreddit is also set, because a monitor that names its subreddits should drop the unwanted name from that list instead. Matched the same way as subreddit (r/Politics, /r/politics and politics are one entry). A delivery filter, not a cost lever: it changes what reaches you, never what is polled."
                      },
                      "q": {
                        "type": "string",
                        "description": "Keyword or phrase, case-insensitive, matched against the fields in search_in (default title and body). New monitors match it on whole words and as an exact phrase; see whole_words, match and stem."
                      },
                      "author": {
                        "type": "string",
                        "description": "Only match posts by this Reddit username (without u/)."
                      },
                      "exclude_terms": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Posts containing any of these terms are suppressed even if they otherwise match. Always matched as a phrase, on whole words when whole_words is true."
                      },
                      "domain": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Outbound link domains to watch for (e.g. example.com). Exact-or-subdomain match only; does not resolve shortened links."
                      },
                      "include_any": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "At least one of these terms must appear (OR match), on top of any q."
                      },
                      "include_all": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 50,
                        "description": "Every one of these terms must appear (AND match), on top of any q."
                      },
                      "search_in": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "title",
                            "body",
                            "url",
                            "permalink"
                          ]
                        },
                        "description": "Which fields keyword/term matching is scoped to. Default [title, body]. Links are searched only when you add url (a link's host and path, never its query string, and never a link to a Reddit thread) or permalink. A monitor created before whole-word matching (its filter_spec has no whole_words field) keeps its old default of [title, body, url]."
                      },
                      "whole_words": {
                        "type": "boolean",
                        "description": "true (the default for every new monitor) matches terms only as whole words: api does not match apis, rapid or therapist. false matches terms anywhere inside other words. A monitor created before this option existed has no whole_words field and keeps substring matching; send true to move it over. An update that omits whole_words keeps the monitor's current setting."
                      },
                      "match": {
                        "type": "string",
                        "enum": [
                          "phrase",
                          "all_words"
                        ],
                        "description": "phrase (default): the words of a term must appear together and in order. all_words: every word of the term must appear, in any order. Applies to q, include_any and include_all; exclude_terms are always phrases."
                      },
                      "stem": {
                        "type": "boolean",
                        "description": "Default false. true also matches simple English plural, -ed and -ing forms of each word (launch matches launches, launched and launching)."
                      },
                      "stream_since": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "readOnly": true,
                        "description": "Set by the server, never by you: when this monitor started watching each stream, keyed kind:subreddit. Items on a stream created before that moment are not delivered, so adding a subreddit or switching kind never replays a backlog. Any value you send is replaced."
                      },
                      "group": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "Optional label to bundle multiple matches into one delivery instead of one per match."
                      },
                      "min_score": {
                        "type": "integer",
                        "description": "Only match posts with at least this many upvotes."
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "post",
                          "comment",
                          "both"
                        ],
                        "description": "What to watch: new posts (default), new comments, or both. Comment watching is plan-gated, and nsfw:false cannot be combined with comment or both."
                      },
                      "min_relevance": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100,
                        "description": "AI relevance floor, 0 to 100 (0 = off). Items scored below it are dropped; delivered items carry their score and a reason. Needs a keyword (q, include_any or include_all) to score against, and is available on the higher monitoring plans."
                      },
                      "nsfw": {
                        "type": "boolean",
                        "description": "Set false to EXCLUDE NSFW/over-18 posts. Omitted or true both mean NSFW is allowed through -- there is no exclude-by-default; you must explicitly pass false to filter it out."
                      }
                    }
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Set false to pause the monitor, true to resume it."
                  },
                  "cadence_s": {
                    "type": "integer",
                    "description": "New poll interval in seconds, same tier-floor clamping as Create Monitor."
                  },
                  "webhook_ids": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "description": "Replace the webhooks this monitor delivers to (up to 20). Omit to keep them; null to go back to every active webhook on the account."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/remove": {
      "post": {
        "operationId": "monitor-remove",
        "summary": "Delete Monitor",
        "description": "Delete a monitor. No undo endpoint; it stops matching immediately and its slot frees up. Its past deliveries are not erased -- they stay queryable via Delivery History, scoped or aggregate, forever. Returns 404 monitor_not_found if the id is not yours. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The monitor's id."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/health": {
      "get": {
        "operationId": "monitor-health",
        "summary": "Monitor Health",
        "description": "Per-monitor delivered/failed/suppressed counts for the last 24h, plus whether the delivery ceiling has been hit and what that ceiling is. `suppressed_24h` counts two different things and `suppressed_breakdown` splits them: `ceiling` (the monitor's daily cap was reached) and `stale` (the item was already older than the freshness window when we first saw it, so it was withheld rather than delivered as if it were new). A stale withhold is the usual reason a monitor's delivered count sits far below its matched count with no error anywhere, and it deliberately does not set `ceiling_reached`, so do not read `suppressed_24h > 0` as 'this monitor is over its limit'. When `suppressed_breakdown.resolved` is false the counts do not add up to the total and `unresolved_reason` says why. Those counts only cover posts we fetched: a post we never fetched was never matched and leaves no row behind, so it is absent from all three counters rather than counted in any of them. `coverage_24h` is the separate field that speaks to fetching, with a `status` of complete, degraded, partial or unknown, fed by the poll log and covering both unrecoverable loss events, published under the codes `reddit_stopped_early` and `feed_outran_check` in `observed_events`, `unobserved_events` and `gaps[].event`, each explained in plain words in `event_descriptions`. `complete` means every poll that ran got back to where the previous poll finished AND every feed was actually polled. The second half is the separate `stream_liveness` field, which reads the polling registry and the per-feed last-successful-poll stamp rather than the poll log, because a feed that is never polled writes nothing to the poll log and so produces a coverage read identical to a healthy monitor's. Its status is live, degraded (see `streams[]` for `never_polled`, `stalled` or `unregistered` per feed) or unknown, and `coverage_24h` can never read `complete` while it is anything but `live`. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "The monitor's id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/monitor/deliveries": {
      "get": {
        "operationId": "monitor-deliveries",
        "summary": "Delivery History",
        "description": "The actual posts a monitor's webhook has received (or attempted), newest first, with real content (title, subreddit, permalink, author), not just counts. Each delivered item also carries an `enrichment` object: a keyword-match relevance score, a lexicon-based sentiment polarity, and a rule-based intent tag, all computed at no extra cost (never a machine-learning or LLM call; see the Delivery History section of the Endpoints doc for the exact shape). It also carries `matched_spans`, a list of {field, start, end} saying where your terms were found: `item[field].slice(start, end)` is the matched text, at most 50 spans per item. Omit id to aggregate history across every monitor you own. Each row carries `target`: {id, deleted: false} for a target that still exists, or, for a target deleted since, {id, kind, destination, deleted: true, deleted_at}, where destination is the URL's host or a masked email address. Past rows stay listed after their target is deleted. Rows detached before that was recorded have target null. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Narrow to one monitor's history. Omit to aggregate across every monitor you own.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter to one delivery status: pending | delivered | failed | dead | suppressed.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max rows to return, 1-200 (default 50).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "ISO-8601 cursor — pass the created_at of the oldest row from the previous page to fetch older deliveries.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/create": {
      "post": {
        "operationId": "monitor-webhook-create",
        "summary": "Register Webhook",
        "description": "Register a delivery target for monitors to send matches to. Requires a recognised monitoring entitlement, which every account has: a free account can register a webhook for its free all-of-Reddit watch. Returns the webhook with its signing secret SHOWN ONCE, so store it immediately, it is never returned again by List Webhooks. An email target (url set to your own account email address, on every plan including Free) takes delivery_mode: instant (one email per match within about a minute, up to 60 an hour per address, the rest of that hour collected into one email), hourly, daily, or digest (every 15 minutes, the default). One email target per address; a second is refused with email_target_exists (409). Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTPS URL to deliver matches to. Must be publicly reachable, no embedded credentials, no loopback/private/link-local address. For an email target, your account email address."
                  },
                  "delivery_mode": {
                    "type": "string",
                    "enum": [
                      "instant",
                      "hourly",
                      "daily",
                      "digest"
                    ],
                    "description": "Email targets only. instant sends one email per match (capped at 60 an hour per address, the rest roll into one email at the top of the hour); hourly and daily send one digest per UTC hour or day; digest (the default) sends one every 15 minutes."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "webhook",
                      "slack",
                      "discord",
                      "email"
                    ],
                    "description": "Payload shape to send. Prefer omitting it: for a hooks.slack.com or discord.com/api/webhooks URL the kind is inferred from the host and the response reports it in kind_inferred_from. slack/discord format as native incoming-webhook messages; webhook sends redditapis' generic signed JSON envelope and is the fallback for an unrecognised host. Sending webhook for a Slack or Discord URL does not force the generic envelope (that combination can never deliver); the host wins and kind_corrected_from says so. Sending one specific kind for a different platform's host is refused with webhook_kind_mismatch (400)."
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/list": {
      "get": {
        "operationId": "monitor-webhook-list",
        "summary": "List Webhooks",
        "description": "List every webhook registered on your account. Never returns the signing secret (shown once, at creation, by Register Webhook). Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/test": {
      "post": {
        "operationId": "monitor-webhook-test",
        "summary": "Test Webhook",
        "description": "Send a one-off test delivery to a registered webhook (rate-limited to 10/min) to confirm it's wired up correctly. A plain webhook receives the same envelope and item shape as a real delivery (one sample post with enrichment and matched_spans) plus `type: \"test\"`, so skip anything with type test in production logic; its delivery_id always starts with test_ and its monitor_id is null. Send item_kind \"comment\" to receive one sample comment (body, link_title, post_id, parent_id ...) instead of a post. On failure the response carries reason and status plus hint (our sentence naming the fix, most often that the target's kind does not match its host) and detail (a bounded, sanitised copy of what the destination itself replied). Returns 404 webhook_not_found, or webhook_url_rejected if the URL fails re-validation (e.g. now resolves to a private address). Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The webhook's id."
                  },
                  "item_kind": {
                    "type": "string",
                    "enum": [
                      "post",
                      "comment"
                    ],
                    "description": "Which sample item to send: post (the default) or comment, so a comment monitor's handler can be built against the shape it will receive."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/delete": {
      "post": {
        "operationId": "monitor-webhook-delete",
        "summary": "Delete Webhook",
        "description": "Permanently delete a webhook. Any monitor still pointing at it will fail to deliver; this does NOT cascade-delete or pause the monitors using it. Past deliveries stay in Delivery History and still name the deleted target (its kind and host, or a masked email address). Cannot be undone. Returns 404 webhook_not_found if the id is not yours. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The webhook's id."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/update": {
      "post": {
        "operationId": "monitor-webhook-update",
        "summary": "Update Email Target",
        "description": "Change an email delivery target's delivery_mode, or pause and resume it with active. Only the fields you send change. Email targets only: a webhook, Slack or Discord target is refused with webhook_not_updatable (400). Every alert email carries a one-click unsubscribe link that pauses its target; send active true here to resume it. Returns 404 webhook_not_found if the id is not yours. Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The email target's id."
                  },
                  "delivery_mode": {
                    "type": "string",
                    "enum": [
                      "instant",
                      "hourly",
                      "daily",
                      "digest"
                    ],
                    "description": "instant, hourly, daily or digest (every 15 minutes)."
                  },
                  "active": {
                    "type": "boolean",
                    "description": "false pauses alert emails to this address, true resumes them."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/monitor/webhook/redrive": {
      "post": {
        "operationId": "monitor-webhook-redrive",
        "summary": "Redrive Dead Deliveries",
        "description": "Send a delivery target's dead-lettered deliveries again, once your endpoint can take them. Endpoint failures are re-sent (an HTTP error other than 410, a network error, a timeout, retries exhausted), and so are deliveries dropped while the target was paused, once it is resumed; a delivery dead because its target was deleted or its URL was refused is not. Oldest first, within since_hours (default 24, up to 720; dead deliveries are kept about 14 days) and limit (default 100, up to 1000). dry_run true lists what would be re-sent and changes nothing. Null post fields may be filled from Reddit on the way out, up to 10 posts per delivery pass. Rate-limited to 10/min. Returns 404 webhook_not_found if the id is not yours, 409 webhook_paused when re-sending to a paused target (a dry run still answers). Cost: Free per call.",
        "tags": [
          "Monitoring"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The delivery target's id."
                  },
                  "since_hours": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 720,
                    "description": "How far back to look, in hours. Default 24."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000,
                    "description": "Most deliveries to re-send in this call. Default 100."
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "true lists what would be re-sent and changes nothing."
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/api/reddit/user/{name}/achievements": {
      "get": {
        "operationId": "reddit-user-achievements",
        "summary": "User Achievements",
        "description": "List a user's public achievements (the trophies shown on reddit.com/user/<name>/achievements), with the timestamp each was granted where Reddit records one. Returns an empty list for an account that has none. Cost: $0.0015 per call.",
        "tags": [
          "Users"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.0015,
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Reddit username (no u/ prefix)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "achievements": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "award_id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "granted_utc": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "granted": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "icon_40": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "icon_70": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/reddit/post/{id}/visibility": {
      "get": {
        "operationId": "reddit-post-visibility",
        "summary": "Post Visibility Check",
        "description": "Is a post still publicly visible, or did it quietly stop being so? A removed Reddit post still returns when fetched by id, with its title, body and score, so this cannot be answered by reading the post. It is answered by fetching the post and then one page of its author's submitted listing and comparing. Returns a `verdict` of `live`, `not_visible` or `undecidable`, a plain-language `reason`, and a `confident` flag. It deliberately never names a CAUSE: a moderator removal, an admin removal, a spam filter and an author who has hidden their post history are indistinguishable from outside, and only one of them is \"removed\". Exactly two upstream calls. Cost: $0.004 per call.",
        "tags": [
          "Posts"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ],
        "x-cost-usd": 0.004,
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Reddit post id (base36, with or without the t3_ prefix)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The post plus a visibility verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": "object"
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "live",
                        "not_visible",
                        "undecidable",
                        "not_found"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    },
                    "confident": {
                      "type": "boolean"
                    },
                    "checked": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed post id"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientCredits"
          },
          "404": {
            "description": "No post with that id"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Pass your API key as a bearer token on every request: Authorization: Bearer <API_TOKEN>."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Alternative to the bearer header: x-api-key: <API_TOKEN>. When both are sent, Authorization is used."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Error response envelope.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code (e.g. AUTH_FAILED, TWO_FACTOR_REQUIRED, TWO_FACTOR_INVALID, UPSTREAM_ERROR, UPSTREAM_BLOCKED, UNKNOWN, CAPTCHA_REJECTED). Branch on this, not on the message text."
          },
          "upstream_ref": {
            "type": "string",
            "nullable": true,
            "description": "Reddit's own per-attempt error reference, when it supplied one. Quote it when reporting a specific failure."
          },
          "hint": {
            "type": "string",
            "description": "On a 400: what to send instead, naming the accepted parameters. For a person to read; branch on code, not on this."
          },
          "field": {
            "type": "string",
            "description": "On a 400: the request parameter the error is about."
          },
          "top_up_url": {
            "type": "string",
            "description": "On a 402: where the balance is topped up."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request — missing or invalid parameters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing Bearer token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Invalid Bearer token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "The account holds no recognised monitoring entitlement (subscription_required), a free account named a subreddit, which is a paid capability (subreddit_scope_requires_paid_plan), the plan's monitor slot limit is already in use (monitor_slots_exhausted), the plan's separate all-of-Reddit watch cap is reached (sitewide_slots_exhausted), or the account already watches as many distinct subreddits as the plan covers (distinct_subreddit_limit_reached). Note that every account holds a free entitlement of one all-of-Reddit post watch, so an account with no subscription is not by itself a 402.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InsufficientCredits": {
        "description": "Your account balance does not cover this call, so nothing was charged and the request was not served. The response body is {\"error\":\"Insufficient credits\",\"top_up_url\":\"https://www.redditapis.com/dashboard/buy-credits?amount=10&utm_source=api&utm_medium=402\",\"message\":\"...\"}; error keeps that exact wording. This is a billing state, not a bad request: the same call succeeds once the balance is topped up, and retrying without topping up returns 402 again, which is why it carries Retry-After: 3600. Top up at the top_up_url, then call again at once; the header does not apply after a top-up. Read the remaining balance any time from GET /account/me, which is free and never returns this error. Distinct from the 402 on the monitoring endpoints, which is about plan entitlements rather than credits.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying without a top-up (3600). An empty balance does not clear by waiting.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServerError": {
        "description": "Unexpected server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "UpstreamError": {
        "description": "Upstream (Reddit) rejected the request — cookies expired or account flagged.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
