API reference · Search engines
Google Finance Search
Query Google Finance using a company or financial search term. This is not a streaming market feed or trading API.
Example
BASH
curl -X POST 'https://api.serpbase.dev/google/finance' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"query":"apple stock"}'Response · real, shortened
{
"status": 0,
"credits_charged": 1,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_finance_search",
"query": "apple stock",
"ai_overview": {
"position": 7,
"sources": [
{
"link": "https://finance.yahoo.com/quote/AAPL/",
"page_title": "Apple Inc. (AAPL) - Yahoo Finance",
"snippet": "Apple Inc. (AAPL) * 5D. 2.24% * 1M. 1.77% * 6M. 29.70% * YTD. 27.68% * 1Y. 29.12% * 5Y. 133.19% * Al…",
"title": "Yahoo Finance"
}
],
"summary": "Apple Inc. (AAPL) is trading at $346.81 on the NASDAQ, up $1.93 (0.56%) from the previous close of $…"
},
"finance": {
"after_hours_price": "()",
"as_of": "Closed: Oct 28, 9:50 AM EDT",
"change": "−1.76 (−0.51%)",
"day_range": "344.83 - 347.18",
"exchange": "NASDAQ: AAPL",
"market_cap": "5.04T",
"open": "346.92",
"pe_ratio": "39.59",
"position": 3,
"previous_close": "347.10",
"price": "345.34 USD",
"title": "Apple Inc",
"year_range": "243.42 - 351.73"
},
"inline_images": [
{
"position": 1,
"rank": 1,
"source": "t1.gstatic.com",
"thumbnail_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAAAUVBMVEX///9mZmZeXl5iYmJXV1daWl…"
}
],
"page": 1,
"people_also_ask": [
{
"position": 6,
"question": "Is it time to sell my Apple stock?"
},
{
"position": 6,
"question": "Is Apple stock declining?"
}
],
"people_also_search_for": [
"Amazon stock price",
"Apple stock stock price prediction"
],
"related_searches": [
"Amazon stock price",
"Apple stock stock price prediction"
],
"result_stats": "About 139 results (0.39s)",
"search_type": "search"
}Parameters
NameWhat it does
format"json" | "markdown"
json (default) returns the parsed result.
More
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
querystring
Example: "apple stock"
The sample shows example parameters, not the complete request contract. Known fields are validated by the API; additional parameters are allowed.
What comes back
The fields are those in the response above; every endpoint also carries status, credits_charged and request_id.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry