Playground Sign in Start free
News and finance · morningstar.com

How to scrape Morningstar

Morningstar is a news and finance site where you can access publicly available content. Developers typically collect news articles, financial data, and market information from its public pages.

Ujeebu scrapes any public website. Not listed here? Try any URL in the Playground or ask us about a site.

Working 1 credit a page, about $0.10 per 1,000 on Pro

20 of 20 of our checks passed in the last 7 days (100%).

Last check 2026-11-23 17:35 UTC · last pass 2026-11-23 17:35 UTC · checked with our own requests, never customer data.

Try it in the Playground

Recipe one call

Use the Morningstar recipe: send the URL, get JSON

1 credit a page
curl -G 'https://api.ujeebu.com/scrape' \
  -H "ApiKey: $UJEEBU_API_KEY" \
  --data-urlencode 'url=https://www.morningstar.com/stocks/xnas/nvda/quote' \
  --data-urlencode 'recipe=morningstar'

The answer is {"result": {...}} with the fields of the recipe. Billed like any /scrape call: successful responses cost credits; blocked, timed-out and failed requests are free.

Run the code on this page with your own key: 5,000 free credits for 21 days, no card. Get a free API key →

Recipe

Call the recipe by name with the recipe parameter: the Scrape API applies its extract rules and the settings that work on Morningstar. Each recipe was run on two real Morningstar pages and keeps only the fields that came back on both; it is checked again every week, and hidden if it stops working.

Public pages

Validated 2026-11-23

One call: recipe=morningstar 1 credit a page

curl -G 'https://api.ujeebu.com/scrape' \
  -H "ApiKey: $UJEEBU_API_KEY" \
  --data-urlencode 'url=https://www.morningstar.com/stocks/xnas/nvda/quote' \
  --data-urlencode 'recipe=morningstar'

The answer is {"result": {...}} with the fields below; the Ujb-Recipe header names the version (for example morningstar/page@v1) and Ujb-Credits the cost.

What this recipe extracts

FieldTypeExample
titletextNVIDIA Corp NVDA
descriptiontextSee NVIDIA Corp (NVDA) stock price (XNAS), Morningstar's analyst ta...
urlURLhttps://www.morningstar.com/stocks/xnas/nvda/quote
headlinetextNvidia Foresees Higher AI Computing Growth for Longer as It Anticip...
summarytextNvidia has a wide economic moat, thanks to its market leadership in...
publisheddate2026-08-27
sectiontextCompany Report
quote.52_week_rangetext$164.28–243.37
quote.avg_volumetext116M
quote.changetext+5.71
quote.change_percenttext3.14%
quote.currencytextUSD
quote.day_rangetext$185.22–194.89
quote.dividend_yieldtext0.29%
quote.employeesnumber (as text)42,000
quote.exchangetextXNAS
quote.forward_dividend_yieldtext0.55%
quote.industrytextSemiconductors
quote.market_captext$4.50T
quote.nametextNVIDIA Corp
quote.pe_rationumber (as text)25.90
quote.previous_closetext$181.60
quote.pricetext$187.31
quote.price_salesnumber (as text)14.62
quote.sectortextTechnology
quote.shares_outstandingtext24.15B
quote.style_boxtextLarge Growth
quote.symboltextNVDA
quote.updated_atdate2026-11-05
quote.volumetext114M
quote.websiteURLhttps://www.nvidia.com

Examples from www.morningstar.com/stocks/xnas/nvda/quote on 2026-11-23, shortened.

Sample output (real, trimmed)

{
    "quote": {
        "52_week_range": "$124.50–243.37",
        "avg_volume": "168M",
        "change": "−20.45",
        "change_percent": "14.01%",
        "currency": "USD",
        "day_range": "$124.50–143.73",
        "dividend_yield": "0.41%",
        "employees": "42,000",
        "exchange": "XNAS",
        "forward_dividend_yield": "0.80%",
        "industry": "Semiconductors",
        "market_cap": "$3.03T",
        "name": "NVIDIA Corp",
        "pe_ratio": "15.12",
        "previous_close": "$145.98",
        "price": "$125.53",
        "price_sales": "8.44",
        "sector": "Technology",
        "shares_outstanding": "24.15B",
        "style_box": "Large Growth",
        "symbol": "NVDA",
        "updated_at": "2026-11-20",
        "volume": "633M",
        "website": "https://www.nvidia.com"
    },
    "title": "NVIDIA Corp NVDA",
    "description": "See NVIDIA Corp (NVDA) stock price (XNAS), Morningstar's analyst take & fair value estimate, plus dividends, financials and news to help you invest smarter.",
    "url": "https://www.morningstar.com/stocks/xnas/nvda/quote",
    "headline": "Nvidia Earnings: Business as Usual as Forecasts Suggest That All Is Well and Shares Are Cheap",
    "summary": "Nvidia's fiscal third-quarter revenue of $115.8 billion was up 103% year over year and ahead of guidance of $108 billion. Nvidia expects January-quarter reve...",
    "published": "2026-11-18",
    "section": "Company Report"
}
extract_rules (8 rules): the rules behind the recipe

The API applies these rules and the settings js=false for you when you send recipe=morningstar. To change what comes back, send your own extract_rules (they replace the recipe's) or any setting (yours always win). Sites without a recipe work the same way with extract rules.

{
    "title": {
        "selector": "h1",
        "type": "text"
    },
    "description": {
        "selector": "meta[name=\"description\"]",
        "type": "attr",
        "attribute": "content"
    },
    "url": {
        "selector": "link[rel=\"canonical\"]",
        "type": "attr",
        "attribute": "href"
    },
    "headline": {
        "selector": ".mdc-stock-analysis-summary__heading__mdc a",
        "type": "text"
    },
    "summary": {
        "selector": ".mdc-stock-analysis-summary__snippet__mdc",
        "type": "text"
    },
    "published": {
        "selector": ".mdc-stock-analysis-summary__header__mdc time",
        "type": "attr",
        "attribute": "datetime"
    },
    "section": {
        "selector": ".mdc-report-section__header__mdc h2",
        "type": "text"
    },
    "quote": {
        "type": "fn",
        "fn": "const __r = (() => { const dl = {}; document.querySelectorAll('.mdc-description-list-item__indiv').forEach(i => { const t = i.querySelector('dt'); const d = i.querySelector('dd'); if (t && d) { const v = d.textContent.replace(/\\s+/g, ' ').trim(); if (v && !/^LOCK/.test(v)) dl[t.textContent.replace(/\\s+/g, ' ').trim().toLowerCase()] = v; } }); const k = re => { const x = Object.keys(dl).find(n => re.test(n)); return x ? dl[x] : null; }; const lp = document.querySelector('.mdc-price-summary__last-price__mdc'); if (!lp) return null; const nums = [...lp.querySelectorAll('.mdc-number')].map(e => e.textContent.trim()); const tm = document.querySelector('.mdc-price-summary__prices__mdc time, .mdc-metadata__list__indiv time'); const pm = location.pathname.match(/\\/stocks\\/([a-z]+)\\/([a-z0-9.\\-]+)\\//i) || (document.querySelector('link[rel=\"canonical\"]') || { href: '' }).href.match(/\\/stocks\\/([a-z]+)\\/([a-z0-9.\\-]+)\\//i); const vol = k(/^volume/); const h1 = document.querySelector('h1'); return { symbol: pm ? pm[2].toUpperCase() : null, name: h1 ? h1.textContent.replace(/\\s+/g, ' ').trim().replace(pm ? new RegExp('\\\\s+' + pm[2] + '$', 'i') : /$^/, '') : null, exchange: pm ? pm[1].toUpperCase() : null, price: nums[0] || null, change: nums[1] || null, change_percent: nums[2] || null, currency: nums[0] && /^\\$/.test(nums[0]) ? 'USD' : null,  previous_close: k(/^previous close/), day_range: k(/^day range/), '52_week_range': k(/^52-week range/), volume: vol ? vol.split(' / ')[0] : null, avg_volume: vol && vol.includes(' / ') ? vol.split(' / ')[1] : null, market_cap: k(/^market cap/), shares_outstanding: k(/^shares outstanding/),  pe_ratio: k(/^price\\/earnings/), price_sales: k(/^price\\/sales/), dividend_yield: k(/^dividend yield \\(trailing\\)/), forward_dividend_yield: k(/^dividend yield \\(forward\\)/), sector: k(/^sector/), industry: k(/^industry/), style_box: k(/^stock style box/), employees: k(/^total number of employees/), website: k(/^website/),  updated_at: tm ? tm.getAttribute('datetime') : null }; })(); if (!__r) return null; const __o = {}; for (const k of [\"52_week_range\",\"avg_volume\",\"change\",\"change_percent\",\"currency\",\"day_range\",\"dividend_yield\",\"employees\",\"exchange\",\"forward_dividend_yield\",\"industry\",\"market_cap\",\"name\",\"pe_ratio\",\"previous_close\",\"price\",\"price_sales\",\"sector\",\"shares_outstanding\",\"style_box\",\"symbol\",\"updated_at\",\"volume\",\"website\"]) if (__r[k] !== undefined && __r[k] !== null) __o[k] = __r[k]; return __o;"
    }
}

Code

Complete scripts: set the UJEEBU_API_KEY environment variable and run them as they are. Each one calls the recipe by name (the Go SDK has no recipe field, so the Go script sends the recipe's rules and settings itself), prints the extracted JSON, and prints the credits the request cost (the Ujb-Credits response header) on stderr. A non-200 answer stops the script with the API's error message.

Public pages

Runs the recipe on the two pages it was validated on, one after the other.

morningstar_page_sdk.py pip install ujeebu-python==0.1.5
# Scrape Morningstar public pages with the Ujeebu Scrape API.
# Calls the recipe morningstar: the API applies its extract rules and validated settings (validated 2026-11-23). Send extract_rules or any setting to override them.
# Uses the official SDK ujeebu-python 0.1.5: pip install ujeebu-python==0.1.5
# Run: UJEEBU_API_KEY=your_key python3 morningstar_page_sdk.py

import json
import os
import sys
import time

import requests
from ujeebu_python import UjeebuClient

API_KEY = os.environ.get("UJEEBU_API_KEY")
URLS = [
    "https://www.morningstar.com/stocks/xnas/nvda/quote",
    "https://www.morningstar.com/stocks/xnys/jpm/quote",
]
RECIPE = "morningstar"  # rules and settings come from the recipe; add your own to override them


def scrape(client, url):
    # a GET with recipe=: the API applies the recipe and answers {"result": {...}}
    try:
        response = client.scrape(url, params={"recipe": RECIPE})
    except requests.RequestException as error:
        sys.exit(f"Request failed for {url}: {error}")
    if response.status_code != 200:
        try:
            message = response.json().get("message", response.text)
        except ValueError:
            message = response.text
        sys.exit(f"HTTP {response.status_code} for {url}: {str(message)[:300]}")
    print(f"Ujb-Credits: {response.headers.get('Ujb-Credits')}, Ujb-Recipe: {response.headers.get('Ujb-Recipe')}", file=sys.stderr)
    return response.json()["result"]


if not API_KEY:
    sys.exit("Set the UJEEBU_API_KEY environment variable.")

client = UjeebuClient(api_key=API_KEY)

for i, url in enumerate(URLS):
    if i:
        time.sleep(2)  # be polite: one page at a time
    result = scrape(client, url)
    quote = result.get("quote") or {}
    print(quote.get("symbol"), quote.get("price"), quote.get("change_percent"), quote.get("market_cap"))
    # Example output: NVDA $125.53 14.01% $3.03T
    # every field: print(json.dumps(result, indent=2, ensure_ascii=False))

SDK tabs use the official Ujeebu SDKs (ujeebu-python 0.1.5, @ujeebu-org/ujeebu-sdk 0.1.2, github.com/ujeebu/ujeebu-go v0.1.8); there is no PHP SDK, so the PHP tab calls the API with curl. For agents and scripts, the same status and settings are at /scrape/morningstar.json.

Try it yourself

Run this on Morningstar with your own key

Get a free API key, set UJEEBU_API_KEY and run any script above as it is. 5,000 free credits for 21 days, no card.

URL patterns and pagination

What the URLs look like, read from the pages our checks fetched.

Public pages

Pattern
https://www.morningstar.com/stocks/{slug}/{slug}/quote
Validated on
https://www.morningstar.com/stocks/xnas/nvda/quotehttps://www.morningstar.com/stocks/xnys/jpm/quote

Settings that work today

From our health checks over the last 7 days: the cheapest settings that return the real page most of the time.

Endpoint/scrape
jstrue
wait_for2000
Costup to 5 credits a request

Each public page is one request: change the path in the URL to fetch another one. Our checks pass with JavaScript rendering on (js=true) and a wait of 2 seconds (wait_for=2000) before the snapshot: keep both.

Try it in the Playground

What people build with Morningstar data

  • Media monitoringTrack the articles published on the topics and companies you follow.More on this use case
  • Content for AI and RAGCollect headlines, dates and summaries as structured input for search and LLM pipelines.More on this use case
  • Publishing timelineMeasure when and how often a site publishes, by section.

Limits and etiquette

  • Public pages only. Pages behind a login, and data shown only to signed-in users, are out of scope.
  • Keep the rate modest: fetch pages one after another or with low concurrency, and cache what you already have.
  • robots.txt of www.morningstar.com (read 2026-11-17): public pages allowed for generic crawlers; no crawl delay set.
  • Read Morningstar's terms of service before you collect data at scale, and do not collect personal data you have no basis to process. This guide is not legal advice.

Questions

Can you scrape Morningstar with Ujeebu?

Yes. 20 of 20 checks of public Morningstar pages passed in the last 7 days with the settings on this page.

Which settings work for Morningstar?

Call /scrape with js=true, wait_for=2000.

How many credits does a Morningstar request cost?

With these settings a request costs up to 5 credits. Only responses with HTTP 200 or 404 are billed: a blocked or timed-out request is free.

Which fields can I extract from Morningstar?

With the extraction recipes on this page, validated on real Morningstar pages through our API: public pages: title, description, url, headline, summary, published, section, 52_week_range, avg_volume, change, change_percent, currency. Pass the recipe as extract_rules in a POST to /scrape and the API returns those fields as JSON.

Is it allowed to scrape Morningstar?

Its robots.txt allows generic crawlers on the page types in this guide. Collect public pages only, read Morningstar's terms of service, keep your request rate modest and do not collect personal data you have no basis to process. This is not legal advice.

How fresh is this page?

The status and settings come from our own health checks of morningstar.com, which run around the clock. Last check: 2026-11-23 17:35:28 UTC; last pass: 2026-11-23 17:35:28 UTC.