{
  "openapi": "3.0.1",
  "info": {
    "title": "Krakt Threadtrack",
    "description": "Paste a Reddit, Hacker News or Bluesky thread. Get every song people mentioned as a clean, deduped tracklist ranked by mentions, verified on MusicBrainz, with Spotify and YouTube links plus a one-click YouTube playlist. About $0.02 per thread.",
    "version": "0.1",
    "x-build-id": "DdoTOJVnc6nG0Df6t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kurtholes~krakt-threadtrack/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kurtholes-krakt-threadtrack",
        "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/kurtholes~krakt-threadtrack/runs": {
      "post": {
        "operationId": "runs-sync-kurtholes-krakt-threadtrack",
        "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/kurtholes~krakt-threadtrack/run-sync": {
      "post": {
        "operationId": "run-sync-kurtholes-krakt-threadtrack",
        "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": [
          "threadUrls"
        ],
        "properties": {
          "threadUrls": {
            "title": "Thread URLs",
            "type": "array",
            "description": "Reddit post, Hacker News item or Bluesky post URLs. One tracklist per thread. X/Twitter is not supported (paid API).",
            "default": [
              "https://news.ycombinator.com/item?id=25093230"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxTracks": {
            "title": "Max tracks per thread",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Top N by mentions.",
            "default": 100
          },
          "minMentions": {
            "title": "Min mentions",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only keep songs mentioned by at least this many people.",
            "default": 1
          },
          "sampleComments": {
            "title": "Sample comments per track",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Quotes kept per song, one per person.",
            "default": 3
          },
          "verifyWithMusicBrainz": {
            "title": "Verify with MusicBrainz",
            "type": "boolean",
            "description": "Check each guess against MusicBrainz (free, 1 request/second) and fix artist/title spelling. Turn off for speed.",
            "default": true
          },
          "keepUnverified": {
            "title": "Keep unverified text guesses",
            "type": "boolean",
            "description": "Keep 'Artist - Title' guesses MusicBrainz could not confirm. Songs from Spotify/YouTube links are always kept.",
            "default": false
          },
          "maxVerifySeconds": {
            "title": "MusicBrainz time budget (s)",
            "minimum": 10,
            "maximum": 3000,
            "type": "integer",
            "description": "MusicBrainz allows 1 request/second, so verification is time-boxed per thread. Candidates left unchecked after this are dropped (link-based songs are kept). Raise it (e.g. 240) for big threads.",
            "default": 45
          },
          "maxRunSeconds": {
            "title": "Run time budget (s)",
            "minimum": 30,
            "maximum": 86400,
            "type": "integer",
            "description": "Stop starting new work after this many seconds and save what was found. Raise it for many or very big threads (also raise the run timeout).",
            "default": 240
          },
          "resolveYouTubeIds": {
            "title": "Build YouTube quick playlist",
            "type": "boolean",
            "description": "Look up a video for each of the top 50 songs so you get one-click watch_videos playlist links.",
            "default": true
          },
          "useApifyProxyForReddit": {
            "title": "Use Apify proxy for Reddit",
            "type": "boolean",
            "description": "Retry Reddit through Apify datacenter proxy when blocked.",
            "default": true
          },
          "spotifyToken": {
            "title": "Spotify access token (optional)",
            "type": "string",
            "description": "Your own Spotify OAuth token with playlist-modify-private scope. If set, a private Spotify playlist is created in your account."
          },
          "spotifyPlaylistName": {
            "title": "Spotify playlist name",
            "type": "string",
            "description": "Defaults to 'Threadtrack: <thread title>'."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}