{"id":24218580,"url":"https://github.com/manas1820/youtube-freemium","last_synced_at":"2026-02-13T12:43:58.286Z","repository":{"id":114310837,"uuid":"527155548","full_name":"Manas1820/Youtube-Freemium","owner":"Manas1820","description":"API to fetch latest videos sorted in reverse chronological order of their publishing date-time from YouTube for a given tag/search query in a paginated response.","archived":false,"fork":false,"pushed_at":"2022-09-05T20:37:25.000Z","size":100,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T12:07:34.473Z","etag":null,"topics":["celery","celery-task","django","drf","rabbitmq","youtube-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Manas1820.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-21T09:07:12.000Z","updated_at":"2022-09-07T04:25:30.000Z","dependencies_parsed_at":"2023-03-10T05:30:27.852Z","dependency_job_id":null,"html_url":"https://github.com/Manas1820/Youtube-Freemium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Manas1820/Youtube-Freemium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manas1820%2FYoutube-Freemium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manas1820%2FYoutube-Freemium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manas1820%2FYoutube-Freemium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manas1820%2FYoutube-Freemium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Manas1820","download_url":"https://codeload.github.com/Manas1820/Youtube-Freemium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manas1820%2FYoutube-Freemium/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268047864,"owners_count":24187208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","celery-task","django","drf","rabbitmq","youtube-api"],"created_at":"2025-01-14T05:28:57.273Z","updated_at":"2026-02-13T12:43:53.254Z","avatar_url":"https://github.com/Manas1820.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Youtube Freemium\n\n## Project Goal\n\nTo make an API to fetch latest videos sorted in reverse chronological order of their publishing date-time from YouTube for a given tag/search query in a paginated response.\n\n## Documentation \n\n- Postman : [https://documenter.getpostman.com/view/20830684/VUqrNchW](https://documenter.getpostman.com/view/20830684/VUqrNchW)\n- When running locally : [http://127.0.0.1:8000/_platform/docs/v1/swagger/](http://127.0.0.1:8000/_platform/docs/v1/swagger/)\n- Admin : [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)\n\n## Tech Stack Used\n\n- [Django Rest Framework](https://www.django-rest-framework.org/)\n- [Celery](https://www.fullstackpython.com/celery.html)\n- [RabbitMq](https://rabbitmq.com/)\n- [Docker](https://www.docker.com/)\n\n## How To Run\n\nClone the Repository\n\n```bash\ngit clone https://github.com/Manas1820/Youtube-Freemium \n```\nChange Directory to Youtube_freemium\n\n```bash\ncd Youtube-Freemium \n```\nCopy `.env` file from example file and set your settings:\n\n```bash\ncp .env.template .env\n```\n\n### For Docker Users :\n\n```bash\ndocker-compose up --build \n```\n\nFor admin intially credentials are : \n- ```user``` = ```admin@backend.com```\n- ```password``` = ```tempPassword@1234```\n\n\u003cb\u003eEnjoy the services at  `localhost:8000`\u003c/b\u003e\n\n### For Local Use\n\nCreate python virtual environment:\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nInstall the dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\nRun migrations:\n\n```bash\npython manage.py migrate\n```\n\u003cb\u003eNOTE : prerequites install are [postgresql](https://www.postgresql.org/download/) \u0026 [rabbitmq](https://www.rabbitmq.com/install-debian.html)\u003c/b\u003e\n\nNow Open Three Different Termina Instances and run the following :\n\n- run `python manage.py runserver`\n- run `celery -A backend worker --beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler`\n- run `celery -A backend worker -l info`\n\nNow you are ready to go !\n\nNow you can create a superuser using \n- `python manage.py createsuperuser`\n\nand after the super user add multiple api tokens to make it work\n\n\u003cb\u003e Refer documentation for using the api's \u003c/b\u003e\n\n## Feature List\n\n- [X] Server call the YouTube API continuously in background (async) with 10 interval for fetching the latest videos for a predefined search query and should store the data of videos (specifically these fields - Video title, description, publishing datetime, thumbnails URLs and any other fields you require) in a database with proper indexes.\n- [X] A GET API which returns the stored video data in a paginated response sorted in descending order of published datetime.\n- [X] A basic search API to search the stored videos using their title and description.\n- [X] The Poject has Docker Support.\n- [X] It is scalable and optimised.\n- [X] Added support for supplying multiple API keys so that if quota is exhausted on one, it automatically uses the next available key.\n- [X] Make a dashboard to view the stored videos with filters and sorting options (For now is supported in admin).\n- [X] Optimise search api, so that it's able to search videos containing partial match for the search query in either video title or description.\n    - Ex 1: A video with title *`How to make tea?`* should match for the search query `tea how`\n\n\n## Reference\n- YouTube data v3 API: [https://developers.google.com/youtube/v3/getting-started](https://developers.google.com/youtube/v3/getting-started)\n- Search API reference: [https://developers.google.com/youtube/v3/docs/search/list](https://developers.google.com/youtube/v3/docs/search/list)\n    - To fetch the latest videos you need to specify these: type=video, order=date, publishedAfter=\u003cSOME_DATE_TIME\u003e\n    - Without publishedAfter, it will give you cached results which will be too old\n- Django Full text search : [https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/search/](https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/search/)\n\n## Author\n👤 **Manas**\n\n* Twitter\n\u003ca href=\"https://twitter.com/manasgupta1820\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Twitter: manasgupta1820\" src=\"https://img.shields.io/twitter/follow/manasgupta1820.svg?style=social\" /\u003e\n  \u003c/a\u003e\n  \n* Github: [@manas1820](https://github.com/manas1820)\n* LinkedIn: [@manas-gupta-253760192](https://www.linkedin.com/in/manas-gupta-253760192)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanas1820%2Fyoutube-freemium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanas1820%2Fyoutube-freemium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanas1820%2Fyoutube-freemium/lists"}