qstringobligatoire
Parameter defines the query you want to search. It can be a stock, index, mutual fund, currency or futures. Head to the Google Finance Autocomplete API to find the query for a company name or a keyword.
https://api.sandbase.ai/v1/api/google/financeGet a Google Finance quote page for a ticker such as GOOGL:NASDAQ: price, movement, key stats, financials, news and price graph over a chosen window.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Get a Google Finance quote page for a ticker such as GOOGL:NASDAQ: price, movement, key stats, financials, news and price graph over a chosen window.
curl -X POST "https://api.sandbase.ai/v1/api/google/finance" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "GOOGL:NASDAQ"}'
The result is returned in outputs[0].data as structured JSON.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Parameter defines the query you want to search. It can be a stock, index, mutual fund, currency or futures. Head to the Google Finance Autocomplete API to find the query for a company name or a keyword. |
hl | string | No | Parameter defines the language to use for the Google Finance search. It's a two or three-letter language code. (e.g., en for English, es for Spanish, or fr for French), optionally followed by a two-letter or three-digit region code (e |
window | string | No | Parameter is used for setting time range for the graph. It can be set to: 1D - 1 Day(default) 5D - 5 Days 1M - 1 Month 6M - 6 Months YTD - Year to Date 1Y - 1 Year 5Y - 5 Years MAX - Maximum |
json_restrictor | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
$0.010 per successful call. Failed calls are not charged.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/google/finance" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "GOOGL:NASDAQ"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
qstringobligatoireParameter defines the query you want to search. It can be a stock, index, mutual fund, currency or futures. Head to the Google Finance Autocomplete API to find the query for a company name or a keyword.
hlstringParameter defines the language to use for the Google Finance search. It's a two or three-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French), optionally followed by a two-letter or three-digit region code (e.g., `en-gb` for British English, or `es-419` for Latin American Spanish). Head to the Google languages page for a full list of supported Google languages.
windowstringParameter is used for setting time range for the graph. It can be set to: `1D` - 1 Day(default) `5D` - 5 Days `1M` - 1 Month `6M` - 6 Months `YTD` - Year to Date `1Y` - 1 Year `5Y` - 5 Years `MAX` - Maximum
json_restrictorstringParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
Google FinanceCette API Google | $0.01 par appel | JSON |
Google | $0.01 par appel | JSON |
Google | $0.015 par appel | JSON |
Google | À partir de $0.002 par appel | JSON |
Google | À partir de $0.0015 par appel | JSON |
Google | $0.01 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/google/finance avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.01 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : q (string). Facultatif : hl (string), window (string) et json_restrictor (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone).
Non. Google Finance fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Google séparément.