{
  "openapi": "3.0.1",
  "info": {
    "title": "Blockdit Scraper — Thai Posts, Creators, Categories & Search",
    "description": "Export public Blockdit posts from Thailand's creator platform: the newest posts, any creator's posts, category and popular feeds, keyword search, single posts, creator profiles and comments — full Thai text, media, reactions by type and impressions. No login.",
    "version": "0.1",
    "x-build-id": "ArGglwad8MVwpjgRF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teodor_banea~blockdit-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teodor_banea-blockdit-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/teodor_banea~blockdit-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teodor_banea-blockdit-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/teodor_banea~blockdit-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teodor_banea-blockdit-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": [
              "latestPosts",
              "creatorPosts",
              "categoryPosts",
              "searchPosts",
              "postUrls",
              "creatorProfiles",
              "comments"
            ],
            "type": "string",
            "description": "Choose what each run collects. One row type per run: posts (the first five modes), creator profiles or comments.",
            "default": "latestPosts"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Enter how many rows to return in total (posts, creators or comments). 0 = all (Latest posts without a \"Published after\" date stop at 10,000).",
            "default": 200
          },
          "language": {
            "title": "Label language",
            "enum": [
              "en",
              "th"
            ],
            "type": "string",
            "description": "Choose the language of category labels and place names (locationName). Post texts stay in their original language (mostly Thai).",
            "default": "en"
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep posts published on or after this date (00:00 UTC), or within a recent period such as \"3 days\". Used by Latest posts, Posts of creators, Search and feeds."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "Keep posts published before this date (00:00 UTC, not included). Leave empty for posts up to now."
          },
          "postTypes": {
            "title": "Post types",
            "type": "array",
            "description": "Keep only these post types. Empty = all (articles, videos and audio / podcasts).",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "video",
                "audio"
              ],
              "enumTitles": [
                "Articles and posts",
                "Videos",
                "Audio / podcasts"
              ]
            }
          },
          "includeShares": {
            "title": "Include re-shares",
            "type": "boolean",
            "description": "Also export re-shares (a creator sharing someone else's post — the row links to the original). About one new post in ten is a re-share.",
            "default": false
          },
          "creatorUrls": {
            "title": "Creator URLs",
            "type": "array",
            "description": "Enter Blockdit creator pages, one per line: https://www.blockdit.com/histofun, https://www.blockdit.com/pages/<id>, https://www.blockdit.com/users/<id> or just the alias (histofun). Used by Posts of creators and Creator profiles.",
            "items": {
              "type": "string"
            }
          },
          "maxPostsPerCreator": {
            "title": "Maximum posts per creator",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Enter how many posts to take from each creator, newest first. 0 = all of them.",
            "default": 100
          },
          "category": {
            "title": "Category or feed",
            "enum": [
              "popular",
              "popularVideo",
              "popularAudio",
              "exploreLatest",
              "business",
              "marketing",
              "stocks-economy",
              "cryptocurrency",
              "sports",
              "science-tech",
              "it-gadgets",
              "entertainment",
              "education",
              "family-kids",
              "books",
              "movies-series",
              "music",
              "k-pop-k-series",
              "cartoons",
              "gaming",
              "arts-design",
              "photography",
              "lifestyle",
              "travel",
              "automobiles",
              "food",
              "health",
              "beauty",
              "pets",
              "agriculture",
              "environment",
              "home-garden",
              "property",
              "history",
              "philosophy",
              "politics",
              "news",
              "global_news",
              "fiction",
              "opinions"
            ],
            "type": "string",
            "description": "Choose a Blockdit category or a site-wide popular feed. Feeds are ranked selections of up to about 500 recent posts (a few weeks), not complete archives.",
            "default": "popular"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Enter words to search for, in Thai or English (e.g. ทองคำ, หุ้น, AI). Each keyword is searched on its own; a post found by several keywords is delivered once, under the first. Used by Search posts and Creator profiles.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "relevance"
            ],
            "type": "string",
            "description": "Newest first covers only about the last 2-3 days on Blockdit; Relevance reaches back years.",
            "default": "newest"
          },
          "maxPostsPerKeyword": {
            "title": "Maximum posts per keyword",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Enter how many posts to take for each keyword. 0 = all results.",
            "default": 100
          },
          "maxCreators": {
            "title": "Maximum creators per keyword",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Creator profiles: enter how many creator pages to take for each keyword. 0 = all results.",
            "default": 50
          },
          "postUrls": {
            "title": "Post URLs",
            "type": "array",
            "description": "Enter Blockdit post URLs (https://www.blockdit.com/posts/<id>) or post ids, one per line. Used by Posts from URLs and Comments.",
            "items": {
              "type": "string"
            }
          },
          "maxCommentsPerPost": {
            "title": "Maximum comments per post",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Enter how many comments (replies included) to take from each post. 0 = all of them.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}