{
  "openapi": "3.0.1",
  "info": {
    "title": "Mastodon Posts by Hashtag, Account, Thread & Trends (no login)",
    "description": "Public Mastodon data as rows: posts of one or more hashtags with boolean tag combinations, an account's public posts, the whole reply tree of a post, trending tags and news links, hashtag discovery with 7-day usage, and profile counts. Authors from any federated server. Keyless API, UTC dates.",
    "version": "0.1",
    "x-build-id": "qC2HRb1utZ1aUvlEg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~mastodon-public-posts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-mastodon-public-posts",
        "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/yadroo~mastodon-public-posts/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-mastodon-public-posts",
        "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/yadroo~mastodon-public-posts/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-mastodon-public-posts",
        "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 fetch",
            "enum": [
              "hashtagPosts",
              "accountPosts",
              "threadReplies",
              "trending",
              "hashtagSearch",
              "profiles"
            ],
            "type": "string",
            "description": "Six questions, one per run. `hashtagPosts` is the topic feed: every public post tagged with the hashtags you name, newest first, and the only mode that takes tag combinations. `accountPosts` exports what named accounts publish. `threadReplies` turns one post into its discussion. `trending` answers \"what is being talked about right now\" as hashtags, shared news links or popular posts. `hashtagSearch` finds the hashtags that exist for a word and how much they are used - useful before you commit a monitoring run to one spelling. `profiles` resolves handles to follower, following and post counts. Each mode fills one dataset view; the other views stay empty.",
            "default": "hashtagPosts"
          },
          "hashtags": {
            "title": "Hashtags",
            "type": "array",
            "description": "Hashtags to read, with or without the leading `#`, case does not matter. Used by `hashtagPosts`; each hashtag is fetched separately and the row limit is split evenly over them, so two tags with a limit of 40 give about the last 20 posts of each. The tag that produced a row is written to `matchedHashtag`, so one dataset can hold several topics and still be filtered per topic.",
            "items": {
              "type": "string"
            }
          },
          "alsoTagged": {
            "title": "Or also tagged with any of",
            "type": "array",
            "description": "Widens the timeline: posts that carry the main hashtag OR any tag listed here. Sent to the source as its `any` parameter, so the widening happens before paging and costs no extra requests. Example: main tag `linux`, also tagged `opensource`, `foss`.",
            "items": {
              "type": "string"
            }
          },
          "mustAlsoBeTagged": {
            "title": "And also tagged with all of",
            "type": "array",
            "description": "Narrows the timeline: only posts that carry the main hashtag AND every tag listed here. Sent to the source as its `all` parameter. Example: main tag `ai`, also tagged `opensource` returns the overlap of the two conversations - the cheapest way to watch a niche instead of a flood.",
            "items": {
              "type": "string"
            }
          },
          "excludeTagged": {
            "title": "But not tagged with",
            "type": "array",
            "description": "Drops posts that also carry one of these tags, before they are fetched (the source's `none` parameter). Made for the common case where a topic tag is shared with a game, a giveaway or a bot stream you do not want in the dataset.",
            "items": {
              "type": "string"
            }
          },
          "localOnly": {
            "title": "Only posts written on mastodon.social",
            "type": "boolean",
            "description": "Off by default, so a hashtag timeline shows the federated conversation: authors from any server that mastodon.social knows. Switch it on to keep only posts written on mastodon.social itself - a narrower, more homogeneous sample that is sometimes what a study of one community needs. Applies to `hashtagPosts`.",
            "default": false
          },
          "accounts": {
            "title": "Accounts",
            "type": "array",
            "description": "Accounts as `name` for mastodon.social accounts, `name@server` for accounts anywhere else in the fediverse, or as a profile link. Used by `accountPosts` and `profiles`. In `accountPosts` the row limit is split evenly over the accounts. An account that does not exist, was deleted or is unknown to this server yields one row with `found: false` and the reason in `notFoundReason`, so a typo in a long list never disappears silently.",
            "items": {
              "type": "string"
            }
          },
          "excludeReplies": {
            "title": "Leave out the account's replies",
            "type": "boolean",
            "description": "On by default: `accountPosts` then returns what the account published rather than the conversations it joined, which is what \"what does this brand post\" usually means. Switch it off for support or community accounts, where the replies are the interesting half. The source applies this before paging, so excluded replies are never fetched or charged.",
            "default": true
          },
          "includeReblogs": {
            "title": "Include boosts of other accounts",
            "type": "boolean",
            "description": "An account timeline mixes in the posts it boosted (reblogged). They are dropped by default so rows are the account's own words. Switch this on to study what it amplifies: kept rows carry `isReblog: true`, the original author in `authorHandle` and the boosting account in `rebloggedBy`.",
            "default": false
          },
          "postUrls": {
            "title": "Post links or ids",
            "type": "array",
            "description": "Posts whose discussion you want, as mastodon.social links (`mastodon.social/@handle/<id>`) or as the bare numeric id this server uses. Used by `threadReplies`. Every post row of any mode carries `statusId` and `localUrl`, so a hashtag or account run can be chained into a thread run. A link on another fediverse server cannot be used directly - that server numbers its posts differently; take the `localUrl` of the same post instead. A deleted or unknown post yields one row with `found: false`.",
            "items": {
              "type": "string"
            }
          },
          "includeAncestors": {
            "title": "Also include the posts above it",
            "type": "boolean",
            "description": "When the link points into the middle of a thread, add the posts it is a reply to (negative `replyDepth`), so the dataset reads from the start of the conversation. Switch off to get only the given post and what came after it.",
            "default": true
          },
          "trendType": {
            "title": "What is trending",
            "enum": [
              "tags",
              "links",
              "posts"
            ],
            "type": "string",
            "description": "`tags` gives one row per trending hashtag with how many accounts used it and how often, for each of the last seven days - feed the tag straight back into `hashtagPosts` to read the posts. `links` is the news monitor: the articles the network is sharing right now with title, description, publisher and per-day counts. `posts` returns the individual posts the server currently promotes.",
            "default": "tags"
          },
          "searchQuery": {
            "title": "Word to find hashtags for",
            "type": "string",
            "description": "Used by `hashtagSearch`: returns the hashtags whose name starts with or contains this word, each with its uses and distinct accounts per day for the last week. This is hashtag discovery, not post search - it answers \"which spelling is actually used\" (`climate`, `climatechange`, `climatecrisis`) before you spend a monitoring run on the wrong one."
          },
          "languages": {
            "title": "Post languages",
            "type": "array",
            "description": "Keep only posts whose declared language is one of these, compared against the `language` column. Empty = every language. The language is declared by the app that posted, not detected by us, and a fair share of posts from other fediverse software carry none at all - those are dropped while this filter is set. Regional variants count as their language (`en-GB` is `en`), and Norwegian also keeps posts declared `no` or `nn` (Nynorsk). Applies to the post modes.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "pt",
                "it",
                "nl",
                "ja",
                "zh",
                "ko",
                "ru",
                "uk",
                "pl",
                "cs",
                "sv",
                "fi",
                "nb",
                "da",
                "tr",
                "ca"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Portuguese",
                "Italian",
                "Dutch",
                "Japanese",
                "Chinese",
                "Korean",
                "Russian",
                "Ukrainian",
                "Polish",
                "Czech",
                "Swedish",
                "Finnish",
                "Norwegian",
                "Danish",
                "Turkish",
                "Catalan"
              ]
            }
          },
          "minFavourites": {
            "title": "At least this many favourites",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Keep only posts with at least this many favourites at fetch time - the quick way to see which posts under a hashtag actually travelled. Empty = no floor. Engagement counts are a snapshot and keep growing, which is why every row carries `fetchedAt`."
          },
          "minReblogs": {
            "title": "At least this many boosts",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Same floor for boosts (reblogs). Boosts travel further than favourites on this network, so this is the better reach filter of the two."
          },
          "excludeSensitive": {
            "title": "Drop posts marked sensitive",
            "type": "boolean",
            "description": "Posts whose author flagged them as sensitive or put them behind a content warning are included by default and marked with `sensitive` and `contentWarning`. Switch this on for brand monitoring or anything that ends up on a shared dashboard.",
            "default": false
          },
          "onlyWithMedia": {
            "title": "Only posts with an image or video",
            "type": "boolean",
            "description": "Ask the source for media posts only (its `only_media` parameter) in `hashtagPosts` and `accountPosts`. Rows then carry `mediaCount`, `mediaTypes` and `mediaUrls` with the file links the post published.",
            "default": false
          },
          "authorInstances": {
            "title": "Only authors from these servers",
            "type": "array",
            "description": "Keep only posts whose author lives on one of these fediverse servers, for example `mastodon.social`, `fosstodon.org`, `pixelfed.social`. Compared against the `authorInstance` column. Empty = every server. This is the filter a federated network needs and a single-server view cannot give you: watch one community inside a worldwide hashtag, or exclude a server that floods a tag.",
            "items": {
              "type": "string"
            }
          },
          "sinceHours": {
            "title": "Posted in the last N hours",
            "minimum": 1,
            "maximum": 8760,
            "type": "number",
            "description": "Rolling window in hours, counted in UTC from the start of the run: 24 for a day, 168 for a week. This is the input for a schedule - it needs no date editing between runs. A hashtag or account timeline stops paging as soon as the source returns posts older than the window, so a narrow window is also a cheap run; the trending-posts list is ranked by popularity, so older posts there are dropped one by one instead."
          },
          "onlyNew": {
            "title": "Skip posts seen in earlier runs",
            "type": "boolean",
            "description": "Remember the ids written by this run in the actor's key-value store and, on the next run of the same actor or task, write only posts that were not written before. Made for monitoring: each run then holds just what is new, and an empty run means nothing was posted. The memory is kept per actor or task, so two tasks watching two hashtags do not interfere.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "number",
            "description": "Hard cap on the rows this run writes, and therefore on what it costs. Paging stops as soon as the cap is reached. In `hashtagPosts`, `accountPosts` and `profiles` the cap is divided over the hashtags or accounts you named. The run also stops at your Maximum cost per run, with the rows written so far.",
            "default": 50
          },
          "fields": {
            "title": "Only these columns",
            "type": "array",
            "description": "Keep only the named columns, in the order given - for example `authorHandle, text, favouriteCount, createdAt, url`. Empty = every column of the mode. `rowType`, `sourceMode` and the row's id column are always kept. Case does not matter and one near miss (`favoriteCount`) is corrected, with a note in the status message; a name no row has is reported and ignored, and a list in which no name exists fails the run with the valid column names.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}