API Documentation

Everything you need to integrate FinEdge Labs segment data into your applications.

Quick Start

# Install

pip install requests

# Fetch segment data

import requests

headers = {"X-API-Key": "fel_your_key_here"}
response = requests.get(
    "https://api.finedgelabs.com/v1/companies/AAPL/segments",
    headers=headers,
)

for segment in response.json()["segments"]:
    print(f"{segment['segment_name']}: {segment['metrics']}")

Endpoints

GET
/api/v1/companies/search

Search companies by ticker or name

Params: q (required), limit

GET
/api/v1/companies/{cik}

Get company details by CIK

Params: cik (path)

GET
/api/v1/companies/{cik}/segments

Get segment financials for a company

Params: cik (path), segment_type, years

GET
/api/v1/companies/{cik}/geographic

Get geographic revenue breakdown

Params: cik (path)

GET
/api/v1/companies/{cik}/filings

Get filing history

Params: cik (path), form_type

GET
/api/v1/compare/segments

Compare segment data across companies

Params: ciks (required), metric, normalize

POST
/api/v1/export/excel

Generate Excel workbook

Params: cik, periods, years, include_segments

POST
/api/v1/export/csv

Export as CSV

Params: cik, periods, years

Authentication

All API requests require an API key passed in the X-API-Key header.

curl -H "X-API-Key: fel_your_key_here" \
  https://api.finedgelabs.com/v1/companies/search?q=AAPL

Get your API key from the API Keys page in your dashboard.