{"id":18935922,"url":"https://github.com/janlukasschroeder/realtime-newsapi","last_synced_at":"2025-04-05T22:04:51.104Z","repository":{"id":50710052,"uuid":"180956999","full_name":"janlukasschroeder/realtime-newsapi","owner":"janlukasschroeder","description":"Financial News Aggregator - Real Time \u0026 Query API for Financial News","archived":false,"fork":false,"pushed_at":"2024-07-23T01:51:35.000Z","size":20,"stargazers_count":247,"open_issues_count":6,"forks_count":38,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T21:03:29.882Z","etag":null,"topics":["api","bloomberg","financial-markets","financial-news-scraper","json","new-york-times","news","news-aggregator","news-feed","news-stream","newsapi","newsfeed","real-time","realtime","reuters","socket-io","wall-street-journal"],"latest_commit_sha":null,"homepage":"https://newsfilter.io","language":"JavaScript","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/janlukasschroeder.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":"2019-04-12T07:44:29.000Z","updated_at":"2025-03-19T19:00:38.000Z","dependencies_parsed_at":"2024-11-22T16:15:42.766Z","dependency_job_id":null,"html_url":"https://github.com/janlukasschroeder/realtime-newsapi","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"e33094a708e05d39206cec5af5f5bb39776fe8c1"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janlukasschroeder%2Frealtime-newsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janlukasschroeder%2Frealtime-newsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janlukasschroeder%2Frealtime-newsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janlukasschroeder%2Frealtime-newsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janlukasschroeder","download_url":"https://codeload.github.com/janlukasschroeder/realtime-newsapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406085,"owners_count":20933803,"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","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":["api","bloomberg","financial-markets","financial-news-scraper","json","new-york-times","news","news-aggregator","news-feed","news-stream","newsapi","newsfeed","real-time","realtime","reuters","socket-io","wall-street-journal"],"created_at":"2024-11-08T12:05:05.165Z","updated_at":"2025-04-05T22:04:51.084Z","avatar_url":"https://github.com/janlukasschroeder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real Time \u0026 Query API for Financial News\n\n- Covers more than 10,000 news sources (Reuters, Bloomberg, The Wall\n  Street Journal, Seeking Alpha, SEC, and many more). [See the full list of\n  sources here.](https://newsfilter.io)\n- Real-time financial news stream using websockets. The API returns a new article\n  as soon as it is published on one of the supported news platforms.\n- Query API to search the [newsfilter.io](https://newsfilter.io) article database\n- JSON formatted\n- Articles mapped to company ticker\n- Supports Python, C++, JavaScript (Node.js, React, jQuery, Angular, Vue), Java\n  and Excel plugins using websocket or socket.io clients\n\n![https://i.imgur.com/Rd7x9Mi.png](https://i.imgur.com/Rd7x9Mi.png)\n\n# Real Time Streaming API\n\nYou can use the streaming API in your command line, or develop your own application\nusing the API as imported package. Both options are explained below.\n\n**Before you start**:\n\n- Install Node.js if you haven't already. On Mac in the command line type `brew install node`.\n\n## Command Line\n\nType in your command line:\n\n1. `npm install realtime-newsapi -g` to install the package\n2. `realtime-newsapi` to connect to the stream\n3. Done! You will see new articles printed in your command line\n   as soon as they are published on one of the supported news platforms.\n\n## Node.js\n\nType in your command line:\n\n1. `mkdir my-project \u0026\u0026 cd my-project` to create a new folder for your project.\n2. `npm init -y` to set up Node.js boilerplate.\n3. `npm install realtime-newsapi` to install the package.\n4. `touch index.js` to create a new file. Copy/paste the example code below\n   into the file index.js.\n\n```js\nconst api = require('realtime-newsapi')();\n\napi.on('articles', (articles) =\u003e {\n  console.log(articles);\n});\n```\n\n5. `node index.js` to start listening for new articles. New filings are\n   printed in your console as soon as they are published on one of the supported news platforms.\n\n## Live Demo\n\n[https://codesandbox.io/s/k5q6nwqkrr](https://codesandbox.io/s/k5q6nwqkrr)\n\n# Query API\n\nUse `curl` or Postman to send requests to the query API. Articles that match your filter criteria are returned in JSON\nformat.\n\n- API endpoint: `https://api.newsfilter.io/public/actions`\n- Supported HTTP Method: `POST`\n- Supported content type: `JSON`\n\n## Example - FDA Approvals\n\nReturn all articles with \"FDA Approval\" in the title or description of the article.\n\nDemo: [https://reqbin.com/bf9gon0l](https://reqbin.com/bf9gon0l)\n\n```json\n{\n  \"type\": \"filterArticles\",\n  \"queryString\": \"title:\\\"FDA Approval\\\" OR description:\\\"FDA Approval\\\"\"\n}\n```\n\n## Example - AAPL\n\nReturn all articles with mentioning `AAPL`.\n\nDemo: [https://reqbin.com/b6qkjsyl](https://reqbin.com/b6qkjsyl)\n\n```json\n{\n  \"type\": \"filterArticles\",\n  \"queryString\": \"title:AAPL OR description:AAPL OR symbols:AAPL\"\n}\n```\n\n# Response Format\n\n- `id` (string) - unique ID of the article\n- `title` (string) - title of the article\n- `description` (string) - description of the article\n- `symbols` (array) - array of ticker symbols mentioned in the article, e.g. AAPL\n- `url` (string) - URL to original article\n- `publishedAt` (string) - ISO 8601 formatted date of publication time\n- `source` (object)\n  - `id` (string) - unique ID of news source\n  - `name` (string) - human readable name of news source\n- `author` (string) - name of the author\n\n## Example\n\n```\n[\n    {\n      source: {\n        id: 'seekingAlpha',\n        name: 'Seeking Alpha'\n      },\n      symbols: ['EWH'],\n      title: 'Hang Seng soars despite massive rally',\n      description: 'Hong Kong is gearing up for more protests this week after hundreds of thousands of anti-government demonstrators braved heavy rain to rally peacefully on Sunday, marking a change to what have often been violent clashes.The scenes showed that the movement is far from fizzling out, triggering fears about retail, tourism and business confidence, as well as worries over the city\\'s stock and property markets.The Hang Seng index still rose 2.2% overnight following a healthy lead from Wall Street and key interest rate reforms from the People\\'s Bank of China.ETFs: EWH, FHK, FLHK',\n      url: 'https://seekingalpha.com/news/3492784-hang-seng-soars-despite-massive-rally',\n      publishedAt: '2019-08-19T03:23:00-04:00',\n      id: 'c7007ef5eae6cf50225cc4f19d368fe5'\n    },\n  {\n    source: {\n      id: 'businesswire',\n      name: 'BusinessWire'\n    },\n    symbols: ['CELG'],\n    title: 'U.S. FDA Approves INREBIC® (Fedratinib) as First New Treatment in Nearly a Decade for Patients With Myelofibrosis',\n    description: 'SUMMIT, N.J.--(BUSINESS WIRE)--Celgene Corporation (NASDAQ: CELG) today announced the U.S. Food and Drug Administration (FDA) has approved INREBIC® (fedratinib) for the treatment of adult patients with intermediate-2 or high-risk primary or secondary (post-polycythemia vera or post-essential thrombocythemia) myelofibrosis.1',\n    url: 'https://www.businesswire.com/news/home/20190816005292/en/U.S.-FDA-Approves-INREBIC%C2%AE-Fedratinib-New-Treatment',\n    publishedAt: '2019-08-16T14:30:00+00:00',\n    id: '129bd08d615d573fed8e12dbb917436e'\n  }\n];\n```\n\n# Consulting\n\nThis service is already used around the world by startups, top news organizations, graduate school researchers,\nand, of course, hackers like you :)\nIf you or your company are interested in more advanced features feel free to email \u0026 contact me for consulting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanlukasschroeder%2Frealtime-newsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanlukasschroeder%2Frealtime-newsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanlukasschroeder%2Frealtime-newsapi/lists"}