This example calls the Apify Actor apple_yang/tiktok-transcripts-scraper
with OkHttp, Jackson, and dotenv-java.
- Java 17
- Maven
From the repository root:
cp .env.example .env
mvn -f examples/java/pom.xml compileSet APIFY_TOKEN in .env or your shell environment.
mvn -f examples/java/pom.xml exec:java -Dexec.mainClass=com.apismith.tiktok.SingleUrlYou can also pass a URL directly:
mvn -f examples/java/pom.xml exec:java -Dexec.mainClass=com.apismith.tiktok.SingleUrl -Dexec.args="https://www.tiktok.com/@foxfamilyguy/video/7587841579029679392"The full response is saved to:
sample-output/generated/java-single-url-response.json