Skip to navigation

Knowledge

Add licensed, structured data—stock and crypto prices, weather, sports, economic indicators, and more—to Web Search API results with one parameter.

View as MarkdownOpen in Claude

Set "knowledge": "core" on POST /v1/search to get data that isn’t on a crawlable page—a stock price mid-session, tomorrow’s forecast, a central bank’s current rate—from licensed providers, returned in results.knowledge alongside web and news results. Knowledge is included in the Web Search API’s $5.00 per 1,000 calls, with no separate endpoint, contract, or add-on charge.

Make a Request

Add knowledge to the body of a POST /v1/search request. core is the only supported value.

curl -X POST https://ydc-index.io/v1/search \
-H "X-API-Key: $YDC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "Current US and Japan policy rates, live USD/JPY",
"count": 10,
"knowledge": "core"
}'

The Python example needs youdotcom 3.5.0 or later.

Response Format

Knowledge results sit in their own array. Web and news results in the same response are unchanged.

{
"results": {
"web": [
{
"url": "https://nvidianews.nvidia.com/news/nvidia-announces-financial-results-for-first-quarter-fiscal-2027",
"title": "NVIDIA Announces Financial Results for First Quarter Fiscal 2027",
"description": "NVIDIA today reported revenue for the first quarter ended April 26, 2026."
}
],
"knowledge": [
{
"type": "answer",
"title": "NVIDIA Corporation Total Revenues (Normalized) (Quarterly)",
"description": "NVIDIA Corporation Total Revenues (Normalized) (Quarterly)'s latest value was $81,615,000,000 in Apr 2026, up 6,424.0% since Jan 2015.",
"attribution": [
{
"name": "Fiscal.ai",
"source_description": "Fiscal.ai is a financial data provider that publishes as-reported and standardized company financials, segments, KPIs, and ratios extracted from filings."
}
],
"as_of": "2026-04-26"
}
]
},
"metadata": {
"query": "Nvidia latest quarterly revenue",
"latency": 0.8123
}
}
FieldDescription
typeThe kind of result. answer is the only value returned today. Skip values you don’t recognize, since a new kind may carry different fields
titleA label for the record, such as the entity and metric it describes
descriptionThe record itself, in prose: the value, its period, and any history the provider supplies
attribution[].nameThe data provider behind the record
attribution[].source_descriptionA short description of that provider
as_ofThe date the underlying data covers, as YYYY-MM-DD. Omitted when the provider reports no date

A few behaviors to plan for:

  • The array can be absent. Up to 25 knowledge results come back, limited to those relevant to the query. When none are relevant, results.knowledge is omitted rather than returned empty, and the response falls back to web and news results.
  • Attribution is a credit, not a citation. Each entry names a provider but carries no URL. Show the provider name and as_of date alongside the value so users can see where it came from and how current it is.

Data in Knowledge

Knowledge draws on dozens of licensed providers, including aggregators that combine hundreds of licensed and public sources. Coverage falls into seven areas:

Knowledge coverage: one Web Search API call reaches live data indexes for stocks, company data, macroeconomics, prices and rates, politics, sports, and weather and climate, from sources including CoinMarketCap, The World Bank, Sportradar, QUODD, YouGov, BLS, AccuWeather, Nasdaq, Polymarket, S&P Global, Baker Hughes, and EIA

AreaExample data
StocksEquity price, market cap, P/E ratio, dividend yield, trading volume
Prices and ratesCrypto prices, FX rates, commodities, mortgage rates, Treasury yields
MacroeconomicsCentral bank rates, CPI and inflation, unemployment, GDP growth, trade balance
CompanyRevenue and earnings, SEC filings, M&A activity, funding rounds, web traffic
SportsLive scores, player stats, league standings, injury reports, schedules
Politics and governmentGovernment spending, polling data, prediction markets, legislative activity
Weather and climateCurrent conditions, forecasts, severe weather alerts, precipitation, air quality

A few things you can build on top of these areas:

  • Stocks and company data: pre-earnings briefs, watchlist assistants, and company enrichment for sales or deal screening
  • Prices, rates, and macroeconomics: currency and rate monitors, crypto-aware assistants, and alerts on economic releases
  • Weather and climate: trip planning and delivery-delay risk for logistics
  • Sports: live-score companions and fantasy sports research
  • Politics and government: public-spending research and prediction-market monitoring

The ydc-knowledge-samples repo has runnable examples for each area.

Accuracy

We measured Knowledge on the VerticalRTK fast set, a public benchmark of questions that target live, structured data. Tako, one of our data partners, built it, and the questions and harness are both public in the VerticalRTK repo, so you can rerun it against any provider.

ConfigurationAccuracy
Web Search API with highlights64.5%
Web Search API with highlights and "knowledge": "core"84.2%

Next Steps