Graph Swiss API
    • Introduction
    • Quickstart
    • Authentication
    • Base URL
    • Errors
    • Request ID
    • Conventions
    • API
      • Health
        • Liveness probe
      • Companies
        • Search companies
        • AI-powered company search
        • Get company by ID
        • Get company journal summaries
        • Get full SHAB journal texts
        • Get detailed company report
      • Persons
        • Search persons
        • Get person by ID
      • Stocks
        • List active Swiss stock symbols
        • Get real-time stock quote
        • Get current stock price
        • Get historical OHLCV data
        • Get latest end-of-day data
        • Get company profile and statistics
        • Get income statement, balance sheet, and cash flow
        • Get key executives for a stock
    • Schemas
      • StockSymbol
      • Error
      • StockQuote
      • Company
      • StockPrice
      • CompanyDetail
      • StockHistoryValue
      • Code
      • StockHistory
      • CompanyWithRelations
      • StockEod
      • CompanyListPage
      • StockProfile
      • Person
      • StockIncomeStatement
      • ShabJournal
      • StockBalanceSheet
      • PersonCompanyLink
      • StockCashFlow
      • PersonWithCompanies
      • StockFinancials
      • PersonListPage
      • StockKeyExecutive

    Quickstart

    Make your first call to Graph Swiss API in three steps.

    Prerequisites#

    An API key — see Authentication.
    The base URL: https://api.graph.swiss — see Base URL.
    Any HTTP client. The examples use curl and fetch.

    1. Verify connectivity#

    Hit /api/health to confirm the API is reachable. This endpoint is open and does not require an API key.
    {
      "success": true,
      "data": {
        "status": "ok",
        "uptime": 1287.42,
        "timestamp": "2026-05-01T12:34:56.789Z"
      }
    }

    2. Make your first authenticated call#

    Send the X-API-Key header on every data request. Below we list active Swiss stock symbols.
    A successful response wraps the payload in a { success, data } envelope:
    {
      "success": true,
      "data": {
        "total": 250,
        "items": [
          { "symbol": "NESN", "name": "Nestlé S.A.", "currency": "CHF", "exchange": "SIX" }
        ]
      }
    }

    3. Read the headers and the envelope#

    Every response carries a few headers worth capturing:
    HeaderWhat it tells you
    X-Request-IdTrace ID for this call — log it with the status code.
    X-Credit-CostCredits charged for this request.
    X-Remaining-BalanceCredits left on your account after this request.
    X-RateLimit-RemainingCalls left in your current rate-limit window.
    And the JSON envelope is always one of:
    { "success": true,  "data": { /* endpoint-specific */ } }
    { "success": false, "error": "...", "code": "MACHINE_READABLE_CODE" }
    If success is false, switch on code to decide how to react. The full list lives on the Errors page.

    Next steps#

    Authentication — how the X-API-Key header works and how credits are deducted
    Errors — handle the standard error envelope, including credit and rate-limit errors
    Conventions — JSON, versioning, and what to expect from every endpoint
    Modified at 2026-05-01 06:35:17
    Previous
    Introduction
    Next
    Authentication
    Built with