{"id":17761362,"url":"https://github.com/dgnsrekt/yfs","last_synced_at":"2025-04-01T13:18:48.945Z","repository":{"id":54966536,"uuid":"295898827","full_name":"dgnsrekt/yfs","owner":"dgnsrekt","description":"Yahoo Finance Scraper with a WYSIWYG approach.","archived":false,"fork":false,"pushed_at":"2021-01-19T04:49:51.000Z","size":1427,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-07T08:16:36.574Z","etag":null,"topics":["finance","scraper","scraper-api","yahoo"],"latest_commit_sha":null,"homepage":"https://dgnsrekt.github.io/yfs/","language":"HTML","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/dgnsrekt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-16T02:10:32.000Z","updated_at":"2022-08-05T02:36:32.000Z","dependencies_parsed_at":"2022-08-14T07:40:23.127Z","dependency_job_id":null,"html_url":"https://github.com/dgnsrekt/yfs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgnsrekt%2Fyfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgnsrekt%2Fyfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgnsrekt%2Fyfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgnsrekt%2Fyfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgnsrekt","download_url":"https://codeload.github.com/dgnsrekt/yfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246644097,"owners_count":20810687,"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":["finance","scraper","scraper-api","yahoo"],"created_at":"2024-10-26T19:34:53.486Z","updated_at":"2025-04-01T13:18:48.926Z","avatar_url":"https://github.com/dgnsrekt.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YFS\r\n## Yahoo Finance Scraper with a WYSIWYG approach.\r\n[![Travis (.org)](https://img.shields.io/travis/dgnsrekt/yfs?style=for-the-badge\u0026logo=appveyor?url=)](https://travis-ci.com/dgnsrekt/yfs)\r\n[![Black](https://img.shields.io/badge/code%20style-black-black?style=for-the-badge\u0026logo=appveyor)](https://github.com/psf/black)\r\n[![GitHub](https://img.shields.io/github/license/dgnsrekt/yfs?style=for-the-badge)](https://raw.githubusercontent.com/dgnsrekt/yfs/master/LICENSE)\r\n\r\nWant to scrape data from the summary page use the get_summary_page function. Want to scrape the summary pages of a list of symbols use the get_multiple_summary_pages function. The returned object can be serialized with .json, .dict, ***and depending on the object .dataframe*** methods. Each function can accept a proxy to help avoid rate limiting. In fact in the future you can install [requests-whaor](https://github.com/dgnsrekt/requests-whaor) ***ANOTHER WORK IN PROGRESS*** which supplies a rotating proxy to bypass rate limits.\r\n\r\n***Before you start please note adding historical data to this API is not a priority. At some point I will get around to it. My main focus are options, quote information and symbol lookup. So please do not raise issues about historical data.***\r\n\r\n## Features\r\n* [x] Company and Symbol lookup\r\n* [x] Summary Page\r\n* [x] Option Chains\r\n* [x] Statistics Page\r\n\r\n## [\u003e\u003e To the documentation.](https://dgnsrekt.github.io/yfs/)\r\n\r\n## Quick Start\r\n\r\n### Prereqs\r\n* Python ^3.8\r\n\r\n### Install with pip\r\n```\r\npip install yfs\r\n```\r\n\r\n### Install with [poetry](https://python-poetry.org/)\r\n```\r\npoetry add yfs\r\n```\r\n\r\n### How to scrape multiple summary pages from yahoo finance.\r\n```python\r\nfrom yfs import get_multiple_summary_pages\r\n\r\nsearch_items = [\"Apple\", \"tsla\", \"Microsoft\", \"AMZN\"]\r\n\r\nsummary_results = get_multiple_summary_pages(search_items)\r\nfor page in summary_results:\r\n    print(page.json(indent=4))\r\n    break  # To shorten up the quick-start output.\r\n\r\nCOLUMNS = [\r\n    \"close\",\r\n    \"change\",\r\n    \"percent_change\",\r\n    \"average_volume\",\r\n    \"market_cap\",\r\n    \"earnings_date\",\r\n]\r\nprint(summary_results.dataframe[COLUMNS])\r\n\r\n```\r\nOutput\r\n```python\r\n➜ python3 quick_start_example.py\r\nDownloading Summary Data... 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:03\u003c00:00, 1.19 symbols/s]{\r\n    \"symbol\": \"AAPL\",\r\n    \"name\": \"Apple Inc.\",\r\n    \"quote\": {\r\n        \"name\": \"Apple Inc.\",\r\n        \"close\": 113.02,\r\n        \"change\": -3.77,\r\n        \"percent_change\": -3.23\r\n    },\r\n    \"open\": 112.89,\r\n    \"high\": 112.22,\r\n    \"low\": 115.37,\r\n    \"close\": 113.02,\r\n    \"change\": -3.77,\r\n    \"percent_change\": -3.23,\r\n    \"previous_close\": 116.79,\r\n    \"bid_price\": 112.58,\r\n    \"bid_size\": 800,\r\n    \"ask_price\": 112.77,\r\n    \"ask_size\": 3000,\r\n    \"fifty_two_week_low\": 137.98,\r\n    \"fifty_two_week_high\": 53.15,\r\n    \"volume\": 144711986,\r\n    \"average_volume\": 172065562,\r\n    \"market_cap\": 1933000000000,\r\n    \"beta_five_year_monthly\": 1.28,\r\n    \"pe_ratio_ttm\": 34.29,\r\n    \"eps_ttm\": 3.3,\r\n    \"earnings_date\": \"2020-10-28\",\r\n    \"forward_dividend_yield\": 0.82,\r\n    \"forward_dividend_yield_percentage\": 0.7,\r\n    \"exdividend_date\": \"2020-08-07\",\r\n    \"one_year_target_est\": 119.24\r\n}\r\n          close  change  percent_change  average_volume     market_cap earnings_date\r\nsymbol\r\nAAPL     113.02   -3.77           -3.23       172065562  1933000000000    2020-10-28\r\nAMZN    3125.00  -96.26           -2.99         5071692  1565000000000    2020-10-29\r\nMSFT     206.19   -6.27           -2.95        34844893  1560000000000    2020-10-21\r\nTSLA     415.09  -33.07           -7.38        80574089   386785000000    2020-10-21\r\n```\r\n### Next step [fuzzy search examples](https://dgnsrekt.github.io/yfs/examples/fuzzy-search-examples/)\r\n\r\n## TODO\r\n* [ ] More testing\r\n* [ ] More Docs\r\n* [ ] More examples\r\n* [ ] [WHAOR](https://github.com/dgnsrekt/requests-whaor) Example\r\n* [ ] Profile Page\r\n* [ ] Financials Page\r\n* [ ] Analysis Page\r\n* [ ] Holders page\r\n* [ ] Sustainability Page\r\n* [ ] Historical Page\r\n* [ ] Chart Page\r\n* [ ] Conversations Page maybe ¯\\_(ツ)_/¯\r\n\r\n## Contact Information\r\nTelegram = Twitter = Tradingview = Discord = @dgnsrekt\r\n\r\nEmail = dgnsrekt@pm.me\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgnsrekt%2Fyfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgnsrekt%2Fyfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgnsrekt%2Fyfs/lists"}