Yahoo Finance Scraper avatar

Yahoo Finance Scraper

Try for free

7 days trial then $5.00/month - No credit card required now

Go to Store
Yahoo Finance Scraper

Yahoo Finance Scraper

harvest/yahoo-finance-scraper
Try for free

7 days trial then $5.00/month - No credit card required now

This Apify Actor scrapes financial data from [Yahoo Finance](https://finance.yahoo.com). It can retrieve stock prices, company details, historical data, and more. The extracted data is structured as JSON and can be exported in multiple formats.

Developer
Maintained by Community

Actor Metrics

  • 2 Monthly users

  • No reviews yet

  • No bookmarks yet

  • 91% runs succeeded

  • Created in Mar 2025

  • Modified 6 days ago

Overview

This Apify Actor scrapes financial data from Yahoo Finance. It can retrieve stock prices, company details, historical data, and more. The extracted data is structured as JSON and can be exported in multiple formats.

Features

  • Scrape real-time stock prices
  • Retrieve company details (market cap, P/E ratio, dividend yield, etc.)
  • Extract historical stock price data
  • Support for custom date ranges
  • Export results as JSON, CSV, Excel

Input

The Actor accepts a JSON object with the following parameters:

1{
2  "ticker": "AAPL",
3  "startDate": "2025-02-01",
4  "endDate": "2025-03-01"
5}

Input Fields

  • ticker (string, required): The stock symbol to search for (e.g., AAPL, GOOGL).
  • startDate (string, optional): The start date for historical data retrieval (format: YYYY-MM-DD).
  • endDate (string, optional): The end date for historical data retrieval (format: YYYY-MM-DD).

Output

The output is structured JSON data with stock details:

1[
2    {
3        "results": {
4            "summaryDetail": {
5                "maxAge": 1,
6                "priceHint": 2,
7                "previousClose": 238.03,
8                "open": 237.705,
9                "dayLow": 234.7,
10                "dayHigh": 240.07,
11                "regularMarketPreviousClose": 238.03,
12                "regularMarketOpen": 237.705,
13                "regularMarketDayLow": 234.7,
14                "regularMarketDayHigh": 240.07,
15                "dividendRate": 1,
16                "dividendYield": 0.0042,
17                "exDividendDate": "2025-02-10T00:00:00.000Z",
18                "payoutRatio": 0.1571,
19                "fiveYearAvgDividendYield": 0.59,
20                "beta": 1.178,
21                "trailingPE": 37.38986,
22                "forwardPE": 28.391092,
23                "volume": 53101971,
24                "regularMarketVolume": 53101971,
25                "averageVolume": 50968729,
26                "averageVolume10days": 45538950,
27                "averageDailyVolume10Day": 45538950,
28                "bid": 235.93,
29                "ask": 236.02,
30                "bidSize": 200,
31                "askSize": 100,
32                "marketCap": 3544164073472,
33                "fiftyTwoWeekLow": 164.08,
34                "fiftyTwoWeekHigh": 260.1,
35                "priceToSalesTrailing12Months": 8.955337,
36                "fiftyDayAverage": 239.9608,
37                "twoHundredDayAverage": 226.14005,
38                "trailingAnnualDividendRate": 0.99,
39                "trailingAnnualDividendYield": 0.0041591395,
40                "currency": "USD",
41                "fromCurrency": null,
42                "toCurrency": null,
43                "lastMarket": null,
44                "coinMarketCapLink": null,
45                "algorithm": null,
46                "tradeable": false
47            },
48            "price": {
49                "maxAge": 1,
50                "preMarketChangePercent": -0.000126029,
51                "preMarketChange": -0.0299988,
52                "preMarketTime": "2025-03-04T14:29:59.000Z",
53                "preMarketPrice": 238,
54                "preMarketSource": "FREE_REALTIME",
55                "postMarketChangePercent": 0.0053829704,
56                "postMarketChange": 1.2700043,
57                "postMarketTime": "2025-03-04T22:17:17.000Z",
58                "postMarketPrice": 237.2,
59                "postMarketSource": "FREE_REALTIME",
60                "regularMarketChangePercent": -0.008822443,
61                "regularMarketChange": -2.100006,
62                "regularMarketTime": "2025-03-04T21:00:01.000Z",
63                "priceHint": 2,
64                "regularMarketPrice": 235.93,
65                "regularMarketDayHigh": 240.07,
66                "regularMarketDayLow": 234.7,
67                "regularMarketVolume": 53101971,
68                "averageDailyVolume10Day": 45538950,
69                "averageDailyVolume3Month": 50968729,
70                "regularMarketPreviousClose": 238.03,
71                "regularMarketSource": "FREE_REALTIME",
72                "regularMarketOpen": 237.705,
73                "exchange": "NMS",
74                "exchangeName": "NasdaqGS",
75                "exchangeDataDelayedBy": 0,
76                "marketState": "POST",
77                "quoteType": "EQUITY",
78                "symbol": "AAPL",
79                "underlyingSymbol": null,
80                "shortName": "Apple Inc.",
81                "longName": "Apple Inc.",
82                "currency": "USD",
83                "quoteSourceName": "Nasdaq Real Time Price",
84                "currencySymbol": "$",
85                "fromCurrency": null,
86                "toCurrency": null,
87                "lastMarket": null,
88                "marketCap": 3544164073472
89            }
90        },
91        "chart": {
92            "meta": {
93                "currency": "USD",
94                "symbol": "AAPL",
95                "exchangeName": "NMS",
96                "fullExchangeName": "NasdaqGS",
97                "instrumentType": "EQUITY",
98                "firstTradeDate": "1980-12-12T14:30:00.000Z",
99                "regularMarketTime": "2025-03-04T21:00:01.000Z",
100                "hasPrePostMarketData": true,
101                "gmtoffset": -18000,
102                "timezone": "EST",
103                "exchangeTimezoneName": "America/New_York",
104                "regularMarketPrice": 235.93,
105                "fiftyTwoWeekHigh": 260.1,
106                "fiftyTwoWeekLow": 164.08,
107                "regularMarketDayHigh": 240.07,
108                "regularMarketDayLow": 234.7,
109                "regularMarketVolume": 53101971,
110                "longName": "Apple Inc.",
111                "shortName": "Apple Inc.",
112                "chartPreviousClose": 250.42,
113                "priceHint": 2,
114                "currentTradingPeriod": {
115                    "pre": {
116                        "timezone": "EST",
117                        "end": "2025-03-04T14:30:00.000Z",
118                        "start": "2025-03-04T09:00:00.000Z",
119                        "gmtoffset": -18000
120                    },
121                    "regular": {
122                        "timezone": "EST",
123                        "end": "2025-03-04T21:00:00.000Z",
124                        "start": "2025-03-04T14:30:00.000Z",
125                        "gmtoffset": -18000
126                    },
127                    "post": {
128                        "timezone": "EST",
129                        "end": "2025-03-05T01:00:00.000Z",
130                        "start": "2025-03-04T21:00:00.000Z",
131                        "gmtoffset": -18000
132                    }
133                },
134                "dataGranularity": "1d",
135                "range": "",
136                "validRanges": [
137                    "1d",
138                    "5d",
139                    "1mo",
140                    "3mo",
141                    "6mo",
142                    "1y",
143                    "2y",
144                    "5y",
145                    "10y",
146                    "ytd",
147                    "max"
148                ]
149            },
150            "quotes": [
151                {
152                    "date": "2025-01-02T14:30:00.000Z",
153                    "high": 249.10000610351562,
154                    "volume": 55740700,
155                    "open": 248.92999267578125,
156                    "low": 241.82000732421875,
157                    "close": 243.85000610351562,
158                    "adjclose": 243.5821990966797
159                },
160                {
161                    "date": "2025-01-03T14:30:00.000Z",
162                    "high": 244.17999267578125,
163                    "volume": 40244100,
164                    "open": 243.36000061035156,
165                    "low": 241.88999938964844,
166                    "close": 243.36000061035156,
167                    "adjclose": 243.0927276611328
168                },
169                {
170                    "date": "2025-01-06T14:30:00.000Z",
171                    "high": 247.3300018310547,
172                    "volume": 45045600,
173                    "open": 244.30999755859375,
174                    "low": 243.1999969482422,
175                    "close": 245,
176                    "adjclose": 244.73092651367188
177                },
178                {
179                    "date": "2025-01-07T14:30:00.000Z",
180                    "high": 245.5500030517578,
181                    "volume": 40856000,
182                    "open": 242.97999572753906,
183                    "low": 241.35000610351562,
184                    "close": 242.2100067138672,
185                    "adjclose": 241.94400024414062
186                },
187                {
188                    "date": "2025-01-08T14:30:00.000Z",
189                    "high": 243.7100067138672,
190                    "volume": 37628900,
191                    "open": 241.9199981689453,
192                    "low": 240.0500030517578,
193                    "close": 242.6999969482422,
194                    "adjclose": 242.43344116210938
195                },
196                {
197                    "date": "2025-01-10T14:30:00.000Z",
198                    "high": 240.16000366210938,
199                    "volume": 61710900,
200                    "open": 240.00999450683594,
201                    "low": 233,
202                    "close": 236.85000610351562,
203                    "adjclose": 236.58987426757812
204                },
205                {
206                    "date": "2025-01-13T14:30:00.000Z",
207                    "high": 234.6699981689453,
208                    "volume": 49630700,
209                    "open": 233.52999877929688,
210                    "low": 229.72000122070312,
211                    "close": 234.39999389648438,
212                    "adjclose": 234.14256286621094
213                },
214                {
215                    "date": "2025-01-14T14:30:00.000Z",
216                    "high": 236.1199951171875,
217                    "volume": 39435300,
218                    "open": 234.75,
219                    "low": 232.47000122070312,
220                    "close": 233.27999877929688,
221                    "adjclose": 233.02378845214844
222                },
223                {
224                    "date": "2025-01-15T14:30:00.000Z",
225                    "high": 238.9600067138672,
226                    "volume": 39832000,
227                    "open": 234.63999938964844,
228                    "low": 234.42999267578125,
229                    "close": 237.8699951171875,
230                    "adjclose": 237.60874938964844
231                },
232                {
233                    "date": "2025-01-16T14:30:00.000Z",
234                    "high": 238.00999450683594,
235                    "volume": 71759100,
236                    "open": 237.35000610351562,
237                    "low": 228.02999877929688,
238                    "close": 228.25999450683594,
239                    "adjclose": 228.00930786132812
240                },
241                {
242                    "date": "2025-01-17T14:30:00.000Z",
243                    "high": 232.2899932861328,
244                    "volume": 68488300,
245                    "open": 232.1199951171875,
246                    "low": 228.47999572753906,
247                    "close": 229.97999572753906,
248                    "adjclose": 229.7274169921875
249                },
250                {
251                    "date": "2025-01-21T14:30:00.000Z",
252                    "high": 224.4199981689453,
253                    "volume": 98070400,
254                    "open": 224,
255                    "low": 219.3800048828125,
256                    "close": 222.63999938964844,
257                    "adjclose": 222.39547729492188
258                },
259                {
260                    "date": "2025-01-22T14:30:00.000Z",
261                    "high": 224.1199951171875,
262                    "volume": 64126500,
263                    "open": 219.7899932861328,
264                    "low": 219.7899932861328,
265                    "close": 223.8300018310547,
266                    "adjclose": 223.58416748046875
267                },
268                {
269                    "date": "2025-01-23T14:30:00.000Z",
270                    "high": 227.02999877929688,
271                    "volume": 60234800,
272                    "open": 224.74000549316406,
273                    "low": 222.3000030517578,
274                    "close": 223.66000366210938,
275                    "adjclose": 223.41436767578125
276                },
277                {
278                    "date": "2025-01-24T14:30:00.000Z",
279                    "high": 225.6300048828125,
280                    "volume": 54697900,
281                    "open": 224.77999877929688,
282                    "low": 221.41000366210938,
283                    "close": 222.77999877929688,
284                    "adjclose": 222.5353240966797
285                },
286                {
287                    "date": "2025-01-27T14:30:00.000Z",
288                    "high": 232.14999389648438,
289                    "volume": 94863400,
290                    "open": 224.02000427246094,
291                    "low": 223.97999572753906,
292                    "close": 229.86000061035156,
293                    "adjclose": 229.6075439453125
294                },
295                {
296                    "date": "2025-01-28T14:30:00.000Z",
297                    "high": 240.19000244140625,
298                    "volume": 75707600,
299                    "open": 230.85000610351562,
300                    "low": 230.80999755859375,
301                    "close": 238.25999450683594,
302                    "adjclose": 237.99832153320312
303                },
304                {
305                    "date": "2025-01-29T14:30:00.000Z",
306                    "high": 239.86000061035156,
307                    "volume": 45486100,
308                    "open": 234.1199951171875,
309                    "low": 234.00999450683594,
310                    "close": 239.36000061035156,
311                    "adjclose": 239.0971221923828
312                },
313                {
314                    "date": "2025-01-30T14:30:00.000Z",
315                    "high": 240.7899932861328,
316                    "volume": 55658300,
317                    "open": 238.6699981689453,
318                    "low": 237.2100067138672,
319                    "close": 237.58999633789062,
320                    "adjclose": 237.3290557861328
321                },
322                {
323                    "date": "2025-01-31T14:30:00.000Z",
324                    "high": 247.19000244140625,
325                    "volume": 101075100,
326                    "open": 247.19000244140625,
327                    "low": 233.44000244140625,
328                    "close": 236,
329                    "adjclose": 235.74081420898438
330                },
331                {
332                    "date": "2025-02-03T14:30:00.000Z",
333                    "high": 231.8300018310547,
334                    "volume": 73063300,
335                    "open": 229.99000549316406,
336                    "low": 225.6999969482422,
337                    "close": 228.00999450683594,
338                    "adjclose": 227.75958251953125
339                },
340                {
341                    "date": "2025-02-04T14:30:00.000Z",
342                    "high": 233.1300048828125,
343                    "volume": 45067300,
344                    "open": 227.25,
345                    "low": 226.64999389648438,
346                    "close": 232.8000030517578,
347                    "adjclose": 232.54432678222656
348                },
349                {
350                    "date": "2025-02-05T14:30:00.000Z",
351                    "high": 232.6699981689453,
352                    "volume": 39620300,
353                    "open": 228.52999877929688,
354                    "low": 228.27000427246094,
355                    "close": 232.47000122070312,
356                    "adjclose": 232.21469116210938
357                },
358                {
359                    "date": "2025-02-06T14:30:00.000Z",
360                    "high": 233.8000030517578,
361                    "volume": 29925300,
362                    "open": 231.2899932861328,
363                    "low": 230.42999267578125,
364                    "close": 233.22000122070312,
365                    "adjclose": 232.9638671875
366                },
367                {
368                    "date": "2025-02-07T14:30:00.000Z",
369                    "high": 234,
370                    "volume": 39707200,
371                    "open": 232.60000610351562,
372                    "low": 227.25999450683594,
373                    "close": 227.6300048828125,
374                    "adjclose": 227.3800048828125
375                },
376                {
377                    "date": "2025-02-10T14:30:00.000Z",
378                    "high": 230.58999633789062,
379                    "volume": 33115600,
380                    "open": 229.57000732421875,
381                    "low": 227.1999969482422,
382                    "close": 227.64999389648438,
383                    "adjclose": 227.64999389648438
384                },
385                {
386                    "date": "2025-02-11T14:30:00.000Z",
387                    "high": 235.22999572753906,
388                    "volume": 53718400,
389                    "open": 228.1999969482422,
390                    "low": 228.1300048828125,
391                    "close": 232.6199951171875,
392                    "adjclose": 232.6199951171875
393                },
394                {
395                    "date": "2025-02-12T14:30:00.000Z",
396                    "high": 236.9600067138672,
397                    "volume": 45243300,
398                    "open": 231.1999969482422,
399                    "low": 230.67999267578125,
400                    "close": 236.8699951171875,
401                    "adjclose": 236.8699951171875
402                },
403                {
404                    "date": "2025-02-13T14:30:00.000Z",
405                    "high": 242.33999633789062,
406                    "volume": 53614100,
407                    "open": 236.91000366210938,
408                    "low": 235.57000732421875,
409                    "close": 241.52999877929688,
410                    "adjclose": 241.52999877929688
411                },
412                {
413                    "date": "2025-02-14T14:30:00.000Z",
414                    "high": 245.5500030517578,
415                    "volume": 40896200,
416                    "open": 241.25,
417                    "low": 240.99000549316406,
418                    "close": 244.60000610351562,
419                    "adjclose": 244.60000610351562
420                },
421                {
422                    "date": "2025-02-18T14:30:00.000Z",
423                    "high": 245.17999267578125,
424                    "volume": 48822500,
425                    "open": 244.14999389648438,
426                    "low": 241.83999633789062,
427                    "close": 244.47000122070312,
428                    "adjclose": 244.47000122070312
429                },
430                {
431                    "date": "2025-02-19T14:30:00.000Z",
432                    "high": 246.00999450683594,
433                    "volume": 32204200,
434                    "open": 244.66000366210938,
435                    "low": 243.16000366210938,
436                    "close": 244.8699951171875,
437                    "adjclose": 244.8699951171875
438                },
439                {
440                    "date": "2025-02-20T14:30:00.000Z",
441                    "high": 246.77999877929688,
442                    "volume": 32316900,
443                    "open": 244.94000244140625,
444                    "low": 244.2899932861328,
445                    "close": 245.8300018310547,
446                    "adjclose": 245.8300018310547
447                },
448                {
449                    "date": "2025-02-21T14:30:00.000Z",
450                    "high": 248.69000244140625,
451                    "volume": 53197400,
452                    "open": 245.9499969482422,
453                    "low": 245.22000122070312,
454                    "close": 245.5500030517578,
455                    "adjclose": 245.5500030517578
456                },
457                {
458                    "date": "2025-02-24T14:30:00.000Z",
459                    "high": 248.86000061035156,
460                    "volume": 51326400,
461                    "open": 244.92999267578125,
462                    "low": 244.4199981689453,
463                    "close": 247.10000610351562,
464                    "adjclose": 247.10000610351562
465                },
466                {
467                    "date": "2025-02-25T14:30:00.000Z",
468                    "high": 250,
469                    "volume": 48013300,
470                    "open": 248,
471                    "low": 244.91000366210938,
472                    "close": 247.0399932861328,
473                    "adjclose": 247.0399932861328
474                },
475                {
476                    "date": "2025-02-26T14:30:00.000Z",
477                    "high": 244.97999572753906,
478                    "volume": 44433600,
479                    "open": 244.3300018310547,
480                    "low": 239.1300048828125,
481                    "close": 240.36000061035156,
482                    "adjclose": 240.36000061035156
483                },
484                {
485                    "date": "2025-02-27T14:30:00.000Z",
486                    "high": 242.4600067138672,
487                    "volume": 41153600,
488                    "open": 239.41000366210938,
489                    "low": 237.05999755859375,
490                    "close": 237.3000030517578,
491                    "adjclose": 237.3000030517578
492                },
493                {
494                    "date": "2025-02-28T14:30:00.000Z",
495                    "high": 242.08999633789062,
496                    "volume": 56833400,
497                    "open": 236.9499969482422,
498                    "low": 230.1999969482422,
499                    "close": 241.83999633789062,
500                    "adjclose": 241.83999633789062
501                },
502                {
503                    "date": "2025-03-03T14:30:00.000Z",
504                    "high": 244.02999877929688,
505                    "volume": 47184000,
506                    "open": 241.7899932861328,
507                    "low": 236.11000061035156,
508                    "close": 238.02999877929688,
509                    "adjclose": 238.02999877929688
510                }
511            ],
512            "events": {
513                "dividends": [
514                    {
515                        "amount": 0.25,
516                        "date": 1739197800
517                    }
518                ]
519            }
520        },
521        "news": [
522            {
523                "uuid": "1e13eabf-c99d-3904-a6a4-d03fc08a7078",
524                "title": "Market Chatter: Apple Challenges UK Order for 'Back Door' in Encryption",
525                "publisher": "MT Newswires",
526                "link": "https://finance.yahoo.com/news/market-chatter-apple-challenges-uk-183737902.html",
527                "providerPublishTime": "2025-03-04T18:37:37.000Z",
528                "type": "STORY",
529                "relatedTickers": [
530                    "AAPL"
531                ]
532            },
533            {
534                "uuid": "b3c763cd-9a2c-3cd5-b7cf-e7587d3e1bc1",
535                "title": "Apple's $500B U.S. Investment? Analyst Calls It 'Completely Unrealistic' – Questions Where The Money Will Come From",
536                "publisher": "Benzinga",
537                "link": "https://finance.yahoo.com/news/apples-500b-u-investment-analyst-144520980.html",
538                "providerPublishTime": "2025-03-04T14:45:20.000Z",
539                "type": "STORY",
540                "relatedTickers": [
541                    "AAPL"
542                ]
543            },
544            {
545                "uuid": "8e90c886-012c-33ed-a167-34de6c84b556",
546                "title": "Apple Launches New iPad Air Tablet",
547                "publisher": "MT Newswires",
548                "link": "https://finance.yahoo.com/news/apple-launches-ipad-air-tablet-143152824.html",
549                "providerPublishTime": "2025-03-04T14:31:52.000Z",
550                "type": "STORY",
551                "relatedTickers": [
552                    "AAPL"
553                ]
554            },
555            {
556                "uuid": "ba039d72-0b15-3f03-abca-289997ac5108",
557                "title": "Apple just dropped new iPad Air models equipped for AI tasks",
558                "publisher": "Quartz",
559                "link": "https://finance.yahoo.com/m/ba039d72-0b15-3f03-abca-289997ac5108/apple-just-dropped-new-ipad.html",
560                "providerPublishTime": "2025-03-04T15:48:03.000Z",
561                "type": "STORY",
562                "thumbnail": {
563                    "resolutions": [
564                        {
565                            "url": "https://s.yimg.com/uu/api/res/1.2/uj1X54lRR.X.OA6K.yIAoA--~B/aD00MjQ7dz02MzY7YXBwaWQ9eXRhY2h5b24-/https://media.zenfs.com/en/quartz.com/012f4c12103d5e29fa91bad7c7ea4e0c",
566                            "width": 636,
567                            "height": 424,
568                            "tag": "original"
569                        },
570                        {
571                            "url": "https://s.yimg.com/uu/api/res/1.2/KgScYkhp60uV6FAS6f7Lkg--~B/Zmk9ZmlsbDtoPTE0MDtweW9mZj0wO3c9MTQwO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/quartz.com/012f4c12103d5e29fa91bad7c7ea4e0c",
572                            "width": 140,
573                            "height": 140,
574                            "tag": "140x140"
575                        }
576                    ]
577                },
578                "relatedTickers": [
579                    "AAPL"
580                ]
581            }
582        ]
583    }
584]

Usage

Run via Apify Console

  1. Go to Apify Console.
  2. Create a new Actor and paste in the scraper code.
  3. Set up the input JSON.
  4. Click Run.

Limitations

  • Yahoo Finance may change its page structure, which could require updates to the scraper.
  • Excessive requests may result in temporary blocks; use proxies to avoid this.
  • Some financial data may require authentication or paid Yahoo Finance subscriptions.

Support

For issues or feature requests, please open an issue on GitHub or contact Apify support.


Author: Your Name
Version: 1.0.0
License: MIT