/restful-trends

A RESTful API to get Trends data from Google, TikTok, YouTube and Twitter

Primary LanguagePythonMIT LicenseMIT

RESTful Trends App

This app contains several online Trends data.

Setup

Setup your service environment by change the .env.example file to .env file and its content. Activate your python environment then install all the dependencies by command:

pip install -r requirement.txt

Then navigate to app/cors.py file to change allowed_domains list in case you want to use this application on your production server. Also you need to change basic authentication account in app/utils.py file.

The default allowed_domain list is:

  • example1.com
  • example2.com

The default of basic authentication account is:

  • username: changeme
  • password: changeme

If you want to use Google Trend AI Worker, you need to change the default prompt which defined in utils.py file.

Usage

If you're in development environment, run the app by the following command:

uvicorn main:app --reload

But if you're in production mode, please run the following command instead:

sh start.sh

Access

After the application is run, you can check the available endpoints on /docs, for example: http://localhost:8000/docs

Docker

On progress..

Todo

  • Twitter trends data

Completed ✓

  • Google trends data
  • TikTok trends data
  • YouTube trends data