{
  "openapi": "3.0.1",
  "info": {
    "title": "Mastodon Posts Scraper: Hashtags, Accounts, Trending, Threads",
    "description": "Scrape public Mastodon posts by hashtag, account, trending, local timeline or thread: text, author, engagement counts, tags, media and link previews. No login or proxy. $0.80 per 1,000 posts.",
    "version": "0.1",
    "x-build-id": "HJQDxt9DcxBKscAH5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~mastodon-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-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/tidyharvest~mastodon-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-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/tidyharvest~mastodon-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "hashtag",
              "accounts",
              "trending",
              "public-local",
              "thread"
            ],
            "type": "string",
            "description": "Hashtag timelines (uses Hashtags), posts from accounts (uses Accounts), trending posts or the local public timeline of the chosen Instance, or the full conversation around posts (uses Post URLs).",
            "default": "hashtag"
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Used in Hashtag mode. One per line: `technology`, `#ai`, `opensource@fosstodon.org` (read that tag on another instance) or a tag URL like `https://fosstodon.org/tags/linux`. Each instance shows the posts it knows about, including ones federated from other servers.",
            "default": [
              "technology"
            ],
            "items": {
              "type": "string"
            }
          },
          "accounts": {
            "title": "Accounts",
            "type": "array",
            "description": "Used in Accounts mode. `@user@instance`, `user@instance`, a profile URL like `https://fosstodon.org/@user`, or a bare `user` on the chosen Instance. Posts are read from the account's home instance.",
            "items": {
              "type": "string"
            }
          },
          "postUrls": {
            "title": "Post URLs (thread mode)",
            "type": "array",
            "description": "Used in Thread mode. Post links like `https://mastodon.social/@user/1234567890`. Returns the post, its parents and its public replies.",
            "items": {
              "type": "string"
            }
          },
          "instance": {
            "title": "Instance",
            "type": "string",
            "description": "Mastodon server to read from, e.g. `mastodon.social`, `fosstodon.org`, `hachyderm.io`. Used for hashtags and bare usernames without their own instance, and for Trending and Local public modes. Some instances (including mastodon.social) require login for their local timeline; that is reported, not bypassed.",
            "default": "mastodon.social"
          },
          "onlyNewerThan": {
            "title": "Only posts newer than",
            "type": "string",
            "description": "A date (`2026-10-01`, ISO date-time) or a relative age (`24 hours`, `7 days`, `2 weeks`). Older posts are skipped and paging stops. Great for scheduled runs."
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "Also return posts that are replies to other posts. Thread mode always includes replies.",
            "default": false
          },
          "includeBoosts": {
            "title": "Include boosts (Accounts mode)",
            "type": "boolean",
            "description": "Also return posts an account boosted (reblogged). The original post is returned with `isBoost: true` and `boostedBy`.",
            "default": false
          },
          "onlyMedia": {
            "title": "Only posts with media",
            "type": "boolean",
            "description": "Keep only posts with images, video or audio attached.",
            "default": false
          },
          "includeProfile": {
            "title": "Profile row per account",
            "type": "boolean",
            "description": "Accounts mode: add one free `type: profile` row per account with bio, avatar, header image, profile fields and follower counts.",
            "default": true
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only posts tagged with one of these ISO 639-1 codes, e.g. `en`, `de`, `ja`. Empty = all languages.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (match any)",
            "type": "array",
            "description": "Keep a post only if its text, content warning or hashtags contain one of these. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerSource": {
            "title": "Max posts per source",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap per hashtag, account, thread or instance. Empty = only the total cap applies."
          },
          "maxItems": {
            "title": "Max posts in total",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on posts for the whole run (also caps your cost). Raise it for bigger pulls; up to 10,000.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}