{
  "openapi": "3.0.1",
  "info": {
    "title": "Sammyboy Forum Scraper",
    "description": "Board and thread scraper for SG Forum Sammyboy.",
    "version": "0.1",
    "x-build-id": "D5zD6wzXbxq4dhXmP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lexac94~sammyboy-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lexac94-sammyboy-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/lexac94~sammyboy-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lexac94-sammyboy-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/lexac94~sammyboy-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lexac94-sammyboy-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": [
              "forum",
              "thread"
            ],
            "type": "string",
            "description": "Board threads returns one row per thread and never opens it. Full thread returns a thread's opening post plus every reply.",
            "default": "forum"
          },
          "forumIds": {
            "title": "Board IDs",
            "maxItems": 50,
            "type": "array",
            "description": "The number in a board URL: sammyboy.com/forums/{name}.{id}/ — for example 17 in /forums/a-singaporeans-guide-to-living-in-jb.17/. Use a board that lists threads, not a category that lists other boards.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "keywords": {
            "title": "Title keyword filter",
            "maxItems": 50,
            "type": "array",
            "description": "Keeps only threads whose title contains one of these words. Case-insensitive. Leave empty to keep every thread.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Exclude these words",
            "maxItems": 50,
            "type": "array",
            "description": "Drops any thread whose title contains one of these words, even if it also matches the filter above. Useful for stripping out spam and off-topic threads.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "matchWholeWords": {
            "title": "Match whole words only",
            "type": "boolean",
            "description": "Off, a keyword matches anywhere in the title, so \"JB\" also matches \"JBCC\". On, it must appear as its own word. Applies to both fields above.",
            "default": false
          },
          "threadIds": {
            "title": "Thread IDs",
            "maxItems": 100,
            "type": "array",
            "description": "The number in a thread URL: sammyboy.com/threads/{name}.{id}/ — for example 111952.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "threadUrls": {
            "title": "Thread URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Full thread URLs, e.g. https://www.sammyboy.com/threads/renovation-to-your-homes.111952/. The ID is read from the URL for you.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPagesPerThread": {
            "title": "Max pages per thread",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "How many pages of replies to read, counting back from the newest. Each page takes about 8 seconds, so a 100-page thread runs for roughly 13 minutes. Set 0 to read the whole thread.",
            "default": 0
          },
          "bulkInput": {
            "title": "Bulk paste",
            "type": "string",
            "description": "One item per line, no quotes or commas. Read as board IDs, thread IDs, or thread URLs depending on the mode. You can paste a column straight from a spreadsheet.",
            "default": ""
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Board threads mode: how many threads to return per board. Full thread mode: how many threads to open — this does not limit replies, use Max pages per thread for that.",
            "default": 50
          },
          "dateFrom": {
            "title": "Only items since",
            "type": "string",
            "description": "Accepts 3d, 12h, 2w, or MM/DD/YY. Leave empty for no date filter. Board threads mode: filters on the later of a thread's start date and its last reply, and stops reading further pages once it passes the cutoff. Pinned threads are always returned, since they stay at the top of a board however old they are. Full thread mode: filters replies by date and stops early, because replies are read newest first. A thread's opening post is always returned.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}