FritzAndFriends / TagzApp

An application that discovers content on social media for hashtags
MIT License
111 stars 69 forks source link

TikTok API #23

Open degenone opened 1 year ago

degenone commented 1 year ago

TikTok has a Research API that can query the field hashtag_name for videos, user info or comments.

They give an example:

curl -L -X POST 'https://open.tiktokapis.com/v2/research/video/query/?fields=id,video_description,create_time' \
-H 'Authorization: Bearer clt.1234asd2387jedyghgs4easd1234asdf84jenryhdlasuie4jh' \
-H 'Content-Type: application/json' \
--data-raw '{
    "query": {
        "and": [
            {
                "operation": "IN",
                "field_name": "region_code",
                "field_values": ["JP", "US"]
            },
            {
                "operation":"EQ",
                "field_name":"hashtag_name",
                "field_values":["animal"]
            }
        ],
        "not": [
          {
                "operation": "EQ",
                "field_name": "video_length",
                "field_values": ["SHORT"]
           }
        ]
    },
    "max_count": 100,
    "cursor": 0,
    "start_date": "20230101",
    "end_date": "20230115"
}'

I tried to find discussion about using the API on reddit and there are some accounts of people having issues with getting their apps approved. 1 2 I have not tried it myself, hopefully it's not going to be an issue.

acidrod commented 1 year ago

Here is another issue to use this Social Network..

image

csharpfritz commented 1 year ago

Moving a a Future milestone with the feedback from @acidrod