Google Finance API endpoint
Returns the category labels Google Finance assigns to a quote such as `AAPL:NASDAQ`, for example Technology, in `categories`. The response also carries the instrument itself: ticker, exchange, name, current price, change, previous close, currency and after-hours data.
/google/finance/classification/{quote}Path parameters:
quote: quote identifier such as AAPL:NASDAQReturns classification labels for a quote.
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| quote (path) | string | Yes | Quote identifier such as AAPL:NASDAQ | AAPL:NASDAQ | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/google/finance/classification/AAPL%3ANASDAQ" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"instrument": {
"ticker": "AAPL",
"exchange": "NASDAQ",
"name": "Apple Inc"
},
"categories": [
"Technology"
]
}
}Request schema
No body schema
Response schema
#/definitions/finance.classificationResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | finance.ClassificationResponse | No | ||||
| data.categories | array | No | Sector or category labels Google Finance assigns to the instrument, for example `Technology`. | |||
| data.instrument | object | No | Instrument the labels belong to. | |||
| data.instrument.after_hours | object | No | Price and change in after-hours trading. | |||
| data.instrument.after_hours.change | number | No | -3.37 | Price change, in the same unit as `price`. | ||
| data.instrument.after_hours.change_percent | number | No | -1.3 | Price change as a percentage. | ||
| data.instrument.after_hours.price | number | No | 255.65 | Price in after-hours trading. | ||
| data.instrument.change | number | No | -3.37 | Price change shown by Google Finance, in the same unit as `price`. | ||
| data.instrument.change_percent | number | No | -1.3 | Price change as a percentage, as Google Finance shows it. | ||
| data.instrument.country | string | No | US | Country code of the instrument, for example `US`. | ||
| data.instrument.currency | string | No | USD | Currency code the instrument is priced in, for example `USD`. | ||
| data.instrument.exchange | string | No | NASDAQ | Exchange the instrument trades on, for example `NASDAQ`. | ||
| data.instrument.google_id | string | No | /m/07zmbvf | Google's id for the instrument, for example `/m/07zmbvf`. | ||
| data.instrument.identifier | string | No | AAPL:NASDAQ | Instrument identifier in `TICKER:EXCHANGE` form, for example `AAPL:NASDAQ`. Use it as the `quote` path parameter. | ||
| data.instrument.last_update_unix | integer | No | 1777077000 | Time of the latest price update, in Unix seconds. | ||
| data.instrument.name | string | No | Apple Inc | Instrument name, for example `Apple Inc`. | ||
| data.instrument.previous_close | number | No | 236.35 | Closing price of the previous trading day. | ||
| data.instrument.price | number | No | 255.65 | Latest price of the instrument. | ||
| data.instrument.ticker | string | No | AAPL | Ticker symbol of the instrument. | ||
| data.instrument.timezone | string | No | America/New_York | IANA time zone of the instrument's market, for example `America/New_York`. | ||
| data.instrument.type | string | No | stock | Kind of instrument: `stock`, `index`, `crypto`, `etf` or `other`. | ||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 500 | Internal Server Error | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/google/finance/classification/AAPL%3ANASDAQ" \
-H "x-api-key: $CRAWLORA_API_KEY"