Skip to main content

Simple http client for TokApi rapid-api tiktok mobile API

Project description

PRs Welcome

The simple http client for TokApi tiktok mobile API

Installation

pip install tokapi-client

Usage

# For RapidAPI
api = TokApi('YOUR_RAPID_API_KEY')

# For api.tokapi.online
api = TokApi('YOUR_API_KEY_FROM_DASHBOARD', base_url="https://api.tokapi.online")

# Let's find some users by search query with pagination
keyword = 'nike'
offset = 0
for i in range(0, 3):
    result = api.search_user_by_keyword(keyword, offset=offset)
    data = result.json()

    for user in data['user_list']:
        info = user['user_info']
        print('Nickname: {}, region: {}'.format(info['nickname'],
                                                info['region']))

    offset = data['cursor']

Examples

You can find more complex usage examples in examples folder

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by TikTok or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokapi-client-0.0.3.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file tokapi-client-0.0.3.tar.gz.

File metadata

  • Download URL: tokapi-client-0.0.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tokapi-client-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1dfdd23d78a5639ad82fbeb82c72c67964835c9cd666f4b0e885cfd145b41cf3
MD5 6b0cdd1482d70479329dce06ac43f197
BLAKE2b-256 6a724fd5964069a78cfc014b5170c9709fce66ed7a2a47ffc012773458c23661

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page