{
  "openapi": "3.0.1",
  "info": {
    "title": "Reddit Posting V2 — Text/Link/Image/Gallery/Video/Poll/Cross",
    "description": "Create any Reddit post type from your saved account: text, link, image (URL), gallery (2–20 URLs), video, poll, crosspost. 7 endpoints. Reddit account required — use Token V2 + matching proxy or a saved account from the Reddit Vault actor.",
    "version": "0.6",
    "x-build-id": "GaGT94apfrfeWpyEc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/red_crawler~reddit-posting-v2/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-red_crawler-reddit-posting-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/red_crawler~reddit-posting-v2/runs": {
      "post": {
        "operationId": "runs-sync-red_crawler-reddit-posting-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/red_crawler~reddit-posting-v2/run-sync": {
      "post": {
        "operationId": "run-sync-red_crawler-reddit-posting-v2",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "What to create",
            "enum": [
              "text",
              "link",
              "image",
              "gallery",
              "video",
              "poll",
              "crosspost"
            ],
            "type": "string",
            "description": "Choose which post type to create. All 7 require a Reddit account — fill the **Reddit credentials** section at the bottom of the form.",
            "default": "text"
          },
          "text_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name (e.g. test), r/name, or full URL."
          },
          "text_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "text_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body. Leave blank for a title-only post."
          },
          "text_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "text_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "text_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "text_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "text_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "link_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name, r/name, or full URL."
          },
          "link_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "link_url": {
            "title": "URL",
            "type": "string",
            "description": "Outbound URL to share."
          },
          "link_body": {
            "title": "Body (optional caption)",
            "type": "string",
            "description": "Optional markdown caption. Some subreddits accept body alongside the link, others silently drop it."
          },
          "link_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID."
          },
          "link_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "link_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "link_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "link_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "image_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name, r/name, or full URL."
          },
          "image_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "image_url": {
            "title": "Image URL",
            "type": "string",
            "description": "Public image URL (jpg / png / gif / webp)."
          },
          "image_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body / caption."
          },
          "image_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "image_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "image_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "image_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "image_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "gallery_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name, r/name, or full URL."
          },
          "gallery_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "gallery_image_urls": {
            "title": "Image URLs",
            "type": "array",
            "description": "List of public image URLs. Min 2, max 20. Order matters — first URL is the cover.",
            "items": {
              "type": "string"
            }
          },
          "gallery_captions": {
            "title": "Captions (optional, aligned with URLs)",
            "type": "array",
            "description": "Optional captions, aligned with the image URLs. Leave entries blank to skip.",
            "items": {
              "type": "string"
            }
          },
          "gallery_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body. Leave blank for none."
          },
          "gallery_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "gallery_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "gallery_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "gallery_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "gallery_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "video_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name, r/name, or full URL."
          },
          "video_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "video_url": {
            "title": "Video URL",
            "type": "string",
            "description": "Public video URL (mp4)."
          },
          "video_poster_url": {
            "title": "Poster URL (optional)",
            "type": "string",
            "description": "Optional thumbnail image URL. If blank, the first video frame is auto-extracted."
          },
          "video_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body. Leave blank for none."
          },
          "video_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "video_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "video_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "video_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "video_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "poll_subreddit": {
            "title": "Subreddit",
            "type": "string",
            "description": "Target subreddit — name, r/name, or full URL. The subreddit must allow poll posts."
          },
          "poll_title": {
            "title": "Title",
            "maxLength": 300,
            "type": "string",
            "description": "Post title (max 300 chars)."
          },
          "poll_options": {
            "title": "Poll options",
            "type": "array",
            "description": "Poll options — 2 minimum. Each entry is a separate option.",
            "items": {
              "type": "string"
            }
          },
          "poll_duration": {
            "title": "Voting duration (days)",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "How long the poll stays open. 1–7 days.",
            "default": 3
          },
          "poll_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body. Leave blank for none."
          },
          "poll_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "poll_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "poll_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "poll_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "poll_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "crosspost_subreddit": {
            "title": "Destination subreddit",
            "type": "string",
            "description": "Where the crosspost will be created — name, r/name, or full URL."
          },
          "crosspost_title": {
            "title": "New title",
            "maxLength": 300,
            "type": "string",
            "description": "Title for the crosspost (max 300 chars)."
          },
          "crosspost_id": {
            "title": "Source",
            "type": "string",
            "description": "Source post or comment — accepts a post URL, t3_ID, raw post ID, full comment URL, or t1_ comment ID."
          },
          "crosspost_body": {
            "title": "Body (optional)",
            "type": "string",
            "description": "Optional markdown body. Leave blank for none."
          },
          "crosspost_flair_id": {
            "title": "Flair template ID (optional)",
            "type": "string",
            "description": "Subreddit flair template ID. Get IDs from the Reddit Flairs V2 actor."
          },
          "crosspost_flair_text": {
            "title": "Flair display text (optional)",
            "type": "string",
            "description": "Custom flair text shown beside the post."
          },
          "crosspost_nsfw": {
            "title": "Mark NSFW",
            "type": "boolean",
            "description": "Flag the post as NSFW.",
            "default": false
          },
          "crosspost_spoiler": {
            "title": "Mark spoiler",
            "type": "boolean",
            "description": "Flag the post as a spoiler.",
            "default": false
          },
          "crosspost_brand_affiliate": {
            "title": "Brand affiliate disclosure",
            "type": "boolean",
            "description": "Mark the post as commercial / brand-affiliate content.",
            "default": false
          },
          "credentialSource": {
            "title": "Credential source",
            "enum": [
              "vault",
              "manual"
            ],
            "type": "string",
            "description": "Every post type here requires a Reddit account. **Use saved account (vault)** loads your stored Token V2 + proxy from the **reddit-vault** actor — only the 'Saved account name' field is used. **Paste Token V2 + proxy** uses the values you paste below.",
            "default": "vault"
          },
          "accountName": {
            "title": "Saved account name (used when source = vault)",
            "pattern": "^[A-Za-z0-9_-]{1,32}$",
            "maxLength": 32,
            "type": "string",
            "description": "The name you used in the **reddit-vault** actor when you stored this account. Token V2 + proxy load automatically from the vault. Ignored when 'Credential source' = manual."
          },
          "bearer": {
            "title": "Token V2 (used when source = manual)",
            "type": "string",
            "description": "Your Reddit `token_v2` cookie value (`eyJ...`). Lifetime ~24 h. Encrypted at rest by Apify. Ignored when 'Credential source' = vault."
          },
          "proxy": {
            "title": "Proxy (used when source = manual)",
            "type": "string",
            "description": "Proxy in `ip:port:user:pass` format. MUST be the same IP that minted the Token V2. Ignored when 'Credential source' = vault."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}