{"id":50487163,"url":"https://github.com/systemslibrarian/news-summarizer-api","last_synced_at":"2026-06-01T23:04:08.194Z","repository":{"id":305256411,"uuid":"1022388957","full_name":"systemslibrarian/news-summarizer-api","owner":"systemslibrarian","description":"Lightweight FastAPI app that pulls headlines on AI from GNews and generates summaries using OpenAI.","archived":false,"fork":false,"pushed_at":"2025-07-27T00:37:50.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-27T03:39:14.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemslibrarian.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,"zenodo":null}},"created_at":"2025-07-19T01:21:53.000Z","updated_at":"2025-07-27T00:37:53.000Z","dependencies_parsed_at":"2025-07-19T06:43:23.108Z","dependency_job_id":null,"html_url":"https://github.com/systemslibrarian/news-summarizer-api","commit_stats":null,"previous_names":["systemslibrarian/news-summarizer-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/systemslibrarian/news-summarizer-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fnews-summarizer-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fnews-summarizer-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fnews-summarizer-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fnews-summarizer-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemslibrarian","download_url":"https://codeload.github.com/systemslibrarian/news-summarizer-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemslibrarian%2Fnews-summarizer-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33797129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"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":[],"created_at":"2026-06-01T23:04:07.493Z","updated_at":"2026-06-01T23:04:08.185Z","avatar_url":"https://github.com/systemslibrarian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📰 News Summarizer API\n\nA lightweight, FastAPI-based microservice that fetches the latest headlines on **AI news** from the GNews API and summarizes them using OpenAI’s language models.\n\n---\n\n## 🚀 Features\n\n- 🔍 Fetches top news headlines related to a specific topic (`AI news` by default)\n- 🧠 Generates concise summaries using the OpenAI API\n- 📡 Exposes a simple REST API endpoint for summary retrieval\n\n---\n\n## 🧱 Prerequisites\n\nBefore running this project, you’ll need:\n\n- ✅ A **GNews API Key** – [https://gnews.io](https://gnews.io)\n- ✅ An **OpenAI API Key** – [https://platform.openai.com](https://platform.openai.com)\n- ✅ Python 3.7+\n- ✅ `pip` for managing dependencies\n\n---\n\n## ⚙️ Setup \u0026 Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/your-username/news-summarizer-api.git\ncd news-summarizer-api\n```\n\nInstall the required packages:\n\n```bash\npip install -r requirements.txt\n```\n\nCreate a `.env` file (or export environment variables directly):\n\n```env\nNEWS_API_KEY=your_gnews_api_key\nOPENAI_API_KEY=your_openai_api_key\n```\n\nReplace `your_gnews_api_key` and `your_openai_api_key` with your actual keys.\n\n---\n\n## ▶️ Running Locally\n\nLaunch the FastAPI app using Uvicorn:\n\n```bash\nuvicorn main:app --reload\n```\n\nVisit: [http://localhost:8000/docs](http://localhost:8000/docs) to explore the Swagger UI.\n\n---\n\n## 🌐 Deployment (e.g., Render.com)\n\n1. Push your code to GitHub\n2. Create a new **Web Service** on [Render.com](https://render.com)\n3. Set your environment variables in the Render dashboard:\n   - `NEWS_API_KEY`\n   - `OPENAI_API_KEY`\n\nRender will automatically detect and deploy your FastAPI service.\n\n---\n\n## 📡 Example Usage\n\nOnce deployed, retrieve the summarized AI news by sending a request to:\n\n```bash\ncurl https://your-service.onrender.com/summarize\n```\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fnews-summarizer-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemslibrarian%2Fnews-summarizer-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemslibrarian%2Fnews-summarizer-api/lists"}