Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nubilfi/restful-trends

A RESTful API to get Trends data from Google, TikTok, YouTube and Twitter
https://github.com/nubilfi/restful-trends

api backend fastapi google python restful-api tiktok trends twitter youtube

Last synced: about 3 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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:

```bashsession
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](https://github.com/nubilfi/restful-trends/blob/2026ff235c507056a85b65988ffb8b12189701ff/app/utils.py#L72) file.

## Usage

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

```bashsession
uvicorn main:app --reload
```

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

```bashsession
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 ✓

- [x] Google trends data
- [x] TikTok trends data
- [x] YouTube trends data