{
  "openapi": "3.0.1",
  "info": {
    "title": "Mastodon Scraper",
    "description": "Scrape any Mastodon instance like public timeline, hashtag streams, user profiles, account search, and trending tags. Pure HTTP, no login required, works against mastodon.social, mas.to, hachyderm.io, fosstodon.org, and every other federated instance.",
    "version": "1.0",
    "x-build-id": "YNO7bPle9lfXwrAA6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~mastodon-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-mastodon-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~mastodon-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-mastodon-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~mastodon-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-mastodon-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "statusByUrl",
              "statusContext",
              "statusSearch",
              "hashtag",
              "hashtagInfo",
              "profile",
              "accountSearch",
              "followers",
              "following",
              "publicTimeline",
              "trending",
              "instanceMetadata"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "statusByUrl"
          },
          "instancePopular": {
            "title": "Instance (popular dropdown)",
            "enum": [
              "",
              "mastodon.social",
              "mas.to",
              "hachyderm.io",
              "fosstodon.org",
              "infosec.exchange",
              "indieweb.social",
              "mastodon.online",
              "c.im",
              "mastodonapp.uk",
              "sfba.social",
              "mstdn.social",
              "mastodon.world",
              "techhub.social",
              "mastodon.art",
              "chaos.social",
              "mastodon.gamedev.place",
              "social.vivaldi.net",
              "mstdn.party",
              "universeodon.com",
              "mstdn.jp"
            ],
            "type": "string",
            "description": "Pick a popular Mastodon instance from the dropdown. If set, this overrides the `instance` textfield. Leave empty to use the textfield.",
            "default": ""
          },
          "instance": {
            "title": "Instance domain (textfield, for power users)",
            "type": "string",
            "description": "Mastodon instance domain (e.g. `mastodon.social`, `mas.to`, custom-instance.tld). The popular dropdown above takes precedence if set. Some instances lock down the public timeline / search; if you hit auth errors, try a different instance.",
            "default": "mastodon.social"
          },
          "statusUrl": {
            "title": "Status URL (mode=statusByUrl / statusContext)",
            "type": "string",
            "description": "Public URL of a Mastodon status (e.g. `https://mastodon.social/@Gargron/110423915824138798`). The instance is derived from the URL and overrides `instance`.",
            "default": "https://mastodon.social/@Gargron/110423915824138798"
          },
          "includeContext": {
            "title": "Include thread context (mode=statusByUrl)",
            "type": "boolean",
            "description": "If true, also emit the full thread (ancestors + descendants) for the status.",
            "default": false
          },
          "hashtag": {
            "title": "Hashtag (mode=hashtag / hashtagInfo)",
            "type": "string",
            "description": "Hashtag without the `#`, e.g. `python`, `linux`, `news`.",
            "default": "python"
          },
          "username": {
            "title": "Username (mode=profile / followers / following)",
            "type": "string",
            "description": "Username on the configured instance, e.g. `Gargron`. For federated users, pass the full handle `username@otherinstance.tld`."
          },
          "searchQuery": {
            "title": "Search query (mode=accountSearch / statusSearch)",
            "type": "string",
            "description": "Free-text query."
          },
          "timelineScope": {
            "title": "Timeline scope (mode=publicTimeline)",
            "enum": [
              "local",
              "federated",
              "remote"
            ],
            "type": "string",
            "description": "`local` = posts from this instance only, `federated` = everything the instance sees, `remote` = federated only excluding local.",
            "default": "federated"
          },
          "trendingType": {
            "title": "Trending type (mode=trending)",
            "enum": [
              "tags",
              "statuses",
              "links"
            ],
            "type": "string",
            "description": "What kind of trending content to fetch.",
            "default": "tags"
          },
          "language": {
            "title": "Language filter",
            "enum": [
              "",
              "en",
              "es",
              "de",
              "fr",
              "ja",
              "zh",
              "pt",
              "ru",
              "it",
              "nl",
              "pl",
              "tr",
              "ar",
              "ko",
              "sv",
              "fi",
              "da",
              "no",
              "cs",
              "uk",
              "hu",
              "ro",
              "el",
              "he",
              "th",
              "vi",
              "id",
              "hi",
              "bg",
              "ca",
              "eu",
              "gl",
              "sl",
              "sk",
              "hr",
              "sr",
              "lt",
              "lv",
              "et",
              "lb"
            ],
            "type": "string",
            "description": "ISO 639-1 language code. Drop statuses not in this language. Leave empty for no filter.",
            "default": ""
          },
          "excludeReplies": {
            "title": "Exclude replies",
            "type": "boolean",
            "description": "Drop statuses that are replies to another post.",
            "default": false
          },
          "excludeReblogs": {
            "title": "Exclude reblogs (boosts)",
            "type": "boolean",
            "description": "Drop statuses that are reblogs of someone else's post.",
            "default": false
          },
          "mediaOnly": {
            "title": "Media only",
            "type": "boolean",
            "description": "Only emit statuses that have at least one media attachment (image / video / GIF / audio).",
            "default": false
          },
          "minFavourites": {
            "title": "Min favourites",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop statuses with fewer than this many favourites."
          },
          "minReblogs": {
            "title": "Min reblogs",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Drop statuses with fewer than this many reblogs (boosts)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 40
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}