Skip to main content
GET
/
financial-metrics
/
snapshot
Financial Metrics Snapshot (Real-Time)
curl --request GET \
  --url https://api.financialdatasets.ai/financial-metrics/snapshot \
  --header 'X-API-KEY: <api-key>'
import requests

url = "https://api.financialdatasets.ai/financial-metrics/snapshot"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://api.financialdatasets.ai/financial-metrics/snapshot', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.financialdatasets.ai/financial-metrics/snapshot",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.financialdatasets.ai/financial-metrics/snapshot"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.financialdatasets.ai/financial-metrics/snapshot")
  .header("X-API-KEY", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.financialdatasets.ai/financial-metrics/snapshot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "snapshot": {
    "ticker": "<string>",
    "market_cap": 123,
    "enterprise_value": 123,
    "price_to_earnings_ratio": 123,
    "price_to_book_ratio": 123,
    "price_to_sales_ratio": 123,
    "enterprise_value_to_ebitda_ratio": 123,
    "enterprise_value_to_revenue_ratio": 123,
    "free_cash_flow_yield": 123,
    "peg_ratio": 123,
    "gross_margin": 123,
    "operating_margin": 123,
    "net_margin": 123,
    "return_on_equity": 123,
    "return_on_assets": 123,
    "return_on_invested_capital": 123,
    "asset_turnover": 123,
    "inventory_turnover": 123,
    "receivables_turnover": 123,
    "days_sales_outstanding": 123,
    "operating_cycle": 123,
    "working_capital_turnover": 123,
    "current_ratio": 123,
    "quick_ratio": 123,
    "cash_ratio": 123,
    "operating_cash_flow_ratio": 123,
    "debt_to_equity": 123,
    "debt_to_assets": 123,
    "interest_coverage": 123,
    "revenue_growth": 123,
    "earnings_growth": 123,
    "book_value_growth": 123,
    "earnings_per_share_growth": 123,
    "free_cash_flow_growth": 123,
    "operating_income_growth": 123,
    "ebitda_growth": 123,
    "payout_ratio": 123,
    "earnings_per_share": 123,
    "book_value_per_share": 123,
    "free_cash_flow_per_share": 123
  }
}
{
  "error": "Bad Request",
  "message": "Invalid request parameters"
}
{
  "error": "Unauthorized",
  "message": "Invalid API key provided"
}
{
  "error": "Payment Required",
  "message": "This endpoint requires a paid subscription. Please upgrade your plan."
}
{
  "error": "Not Found",
  "message": "Ticker XXXX not found"
}

Overview

We have real-time financial metrics for all actively-traded equities in the US. To get started, please create an account and grab your API key at financialdatasets.ai. You will use the API key to authenticate your API requests.

Coverage

TickersYears of CoverageUpdated
13,000+LatestWithin 1 second

Getting Started

There are only 3 steps for making a successful API call:
  1. Add your API key to the header of the request as X-API-KEY.
  2. Add query params like ticker to filter the data.
  3. Execute the API request.
Note: You must provide the ticker.

Example

Financial Metrics Snapshot
import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# set your query params
ticker = 'AAPL'

# create the URL
url = (
    f'https://api.financialdatasets.ai/financial-metrics/snapshot'
    f'?ticker={ticker}'
)

# make API request
response = requests.get(url, headers=headers)

# parse snapshot from the response
snapshot = response.json().get('snapshot')

Authorizations

X-API-KEY
string
header
required

API key for authentication.

Query Parameters

ticker
string

The ticker symbol of the company.

cik
string

The Central Index Key (CIK) of the company. Can be used instead of ticker.

Response

Financial metrics snapshot response

snapshot
object