Yotter API built with Flask and Python.
- yt_data contains all the python files required to gather all the Youtube data.
- tw_data contains all the python files required to gather all the Twitter data.
- server.py contains the API logic.
All endpoints return a JSON with the info.
-
/api/search/<string:search_terms>
Returns a JSON with the 20 first search results.
-
/api/search/<string:search_terms>/page/<int:page>
Returns a JSON with the 20 first search results from page int:page
-
/api/search/<string:search_terms>/sort/<int:sort>
Returns a JSON with the 20 first search results sorted by int:sort.
-
/api/search/<string:search_terms>/page/<int:page>/sort/<int:sort>
Returns a JSON with the 20 first search results from page int:page sorted by int:sort.
/api/channel/<string:channelId>
Returns a channel's (channelId) info and videos.
/api/channel/<string:channelId>/page/<int:page>
Returns a channel's (channelId) info and the videos from page int:page
/api/channel/info/<string:channelId>
Returns only a channel's info.
Install python3
, python3 pip
, python3 venv
and git
if not already installed.
- Clone this repository:
git clone https://github.com/ytorg/yotter-api
cd yotter-api
- Create a python
venv
:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Run the development server:
flask run --host 0.0.0.0
- Try it out!
curl 127.0.0.1:5000/api/search/Never Gonna Give You Up