Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Use TikTok Transcript API with Java

This example calls the Apify Actor apple_yang/tiktok-transcripts-scraper with OkHttp, Jackson, and dotenv-java.

Requirements

  • Java 17
  • Maven

Setup

From the repository root:

cp .env.example .env
mvn -f examples/java/pom.xml compile

Set APIFY_TOKEN in .env or your shell environment.

Run

mvn -f examples/java/pom.xml exec:java -Dexec.mainClass=com.apismith.tiktok.SingleUrl

You 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