{
  "openapi": "3.0.1",
  "info": {
    "title": "BookTok Scraper",
    "description": "Discover public TikTok videos from BookTok hashtags and selected video URLs. Export captions, creators, posting dates and available engagement statistics, with optional named-book filters.",
    "version": "1.6",
    "x-build-id": "eUzDqyd3Vr9DkJH22"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thescrapelab~booktok-trend-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thescrapelab-booktok-trend-intelligence",
        "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/thescrapelab~booktok-trend-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-thescrapelab-booktok-trend-intelligence",
        "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/thescrapelab~booktok-trend-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-thescrapelab-booktok-trend-intelligence",
        "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": {
          "sources": {
            "title": "Hashtags or video URLs",
            "maxItems": 1000,
            "type": "array",
            "description": "Enter hashtags such as #booktok or full public TikTok video URLs. Direct public access is tried first. Enable the optional native proxy fallback only if you accept that traffic. No keywords, creator feeds or login cookies.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Global maximum unique videos delivered across all sources. Billed once per delivered video. Source access, filters, spending and time limits may reduce results.",
            "default": 10
          },
          "bookFilters": {
            "title": "Book titles (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Optional Title | Author filters matched against native caption text. Leave empty for all videos from your selected BookTok hashtags. No AI, audio transcription or catalog lookup.",
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "default": []
          },
          "videoUrls": {
            "title": "Public TikTok video URLs",
            "type": "array",
            "description": "Legacy book-summary workflow: specific public video URLs. Use sources for per-video discovery.",
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "title": "Book titles to match",
            "maxItems": 50,
            "type": "array",
            "description": "One book per line as Title | Author. Live public captions must match the book. Supplied transcripts and metrics are ignored. ISBN-only matching needs the ISBN in the fetched caption; no catalog lookup is performed.",
            "items": {
              "type": "string",
              "maxLength": 300
            },
            "default": [
              "Dune | Frank Herbert"
            ]
          },
          "maxTotalVideos": {
            "title": "Maximum videos to check",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum unique video URLs attempted or imported observations read, including unavailable videos. Collection also stops after about 145 seconds."
          },
          "maxBooks": {
            "title": "Maximum book summaries",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum paid book summaries delivered. Each book needs at least one matching observation. For Compare books, set this to at least 2."
          },
          "includeVideoEvidence": {
            "title": "Add matched video rows to the dataset",
            "type": "boolean",
            "description": "Optional individual video rows linked to delivered book summaries. These rows have no additional fee. Matched videos are also available separately as JSON and CSV.",
            "default": false
          },
          "minimumMatchConfidence": {
            "title": "Minimum book match confidence",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "Confidence from 0 to 1 for matching caption or supplied transcript text to a named book. Higher values favor precision. Zero can include unrelated candidates; the normal threshold is 0.55."
          },
          "dateFrom": {
            "title": "Videos from",
            "type": "string",
            "description": "Optional start date such as 2026-01-01. Dated videos before this point and undated observations are excluded."
          },
          "dateTo": {
            "title": "Videos to",
            "type": "string",
            "description": "Optional inclusive end date such as 2026-12-31. No date window is applied when both dates are empty."
          },
          "maxRepresentativeVideos": {
            "title": "Preview videos per book",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum matched videos embedded inside each book summary; does not limit the separate video export."
          },
          "mode": {
            "title": "Book matching mode",
            "pattern": "^(?:watchlist|discover|compare)$",
            "type": "string",
            "description": "Match the named books, compare at least two named books, or use explicit bookTitle labels from imported observations. No mode searches TikTok keywords or hashtags.",
            "default": "watchlist"
          },
          "providedRecords": {
            "title": "Import video observations (JSON)",
            "type": "array",
            "description": "Legacy import seeds. Each record must contain a public TikTok video URL or native video ID. Original captions, transcripts, dates and metrics are ignored; current public data is fetched. Imports without live identity fail with a migration message.",
            "items": {
              "type": "object"
            }
          },
          "providedDatasetId": {
            "title": "Your Apify dataset ID",
            "type": "string",
            "description": "Accessible dataset of live TikTok URL/ID seeds. Data is re-fetched from TikTok; no historical records are delivered as current facts."
          },
          "searchDepth": {
            "title": "Search depth (inactive compatibility field)",
            "pattern": "^(?:quick|balanced|deep)$",
            "type": "string",
            "description": "Accepted for older API requests. Does not start searches, change video limits or enable additional websites.",
            "default": "quick"
          },
          "books": {
            "title": "Books (legacy API field)",
            "maxItems": 50,
            "type": "array",
            "description": "Backward-compatible API field for named books. New integrations should use targets.",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "enrichWithGoodreads": {
            "title": "Add Goodreads details (legacy)",
            "type": "boolean",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors.",
            "default": false
          },
          "maxVideosPerBook": {
            "title": "Videos per named book (legacy)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "maxDiscoveryVideosPerQuery": {
            "title": "Videos per discovery topic (legacy)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "maxUpstreamChargeUsd": {
            "title": "Maximum charge per source (legacy)",
            "minimum": 0,
            "maximum": 20,
            "type": "number",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "useOpenLibraryFallback": {
            "title": "Use Open Library fallback (legacy)",
            "type": "boolean",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "includeUnmatchedVideos": {
            "title": "Include unmatched videos (legacy)",
            "type": "boolean",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "upstreamTimeoutSecs": {
            "title": "Source timeout (legacy)",
            "minimum": 60,
            "maximum": 900,
            "type": "integer",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "strictMode": {
            "title": "Fail on incomplete source data (legacy)",
            "type": "boolean",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors."
          },
          "discoveryQueries": {
            "title": "Discovery topics (legacy API field) (legacy)",
            "maxItems": 50,
            "type": "array",
            "description": "Inactive compatibility field. Retained for existing requests; does not enable searches, catalog enrichment, paid APIs or child Actors.",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "useApifyProxy": {
            "title": "Allow native proxy fallback",
            "type": "boolean",
            "description": "Optional paid native Apify residential-proxy traffic when direct hashtag access fails. Off by default. Only public pages are collected; no login or challenge solving. The Actor pricing panel describes applicable charges.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}