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

    Conventions

    This page lists the conventions the API follows everywhere, so the reference for individual endpoints can stay focused on what's specific to that endpoint.

    Content type#

    Request bodiesJSON (Content-Type: application/json)
    Response bodiesJSON (Content-Type: application/json; charset=utf-8)
    Max request body size1 MB
    No XML, no form-encoded uploads on JSON endpoints.

    Response envelope#

    Every JSON response wraps its payload in a consistent envelope. Look at success first.

    Success#

    {
      "success": true,
      "data": { "...": "endpoint-specific fields" }
    }
    The exact shape next to success: true depends on the endpoint — see the API reference for each route's schema.

    Error#

    {
      "success": false,
      "error": "Human-readable message",
      "code": "MACHINE_READABLE_CODE"
    }
    Some errors carry additional fields (issues for validation, request_id for unhandled errors). The full taxonomy is on the Errors page.

    HTTP status codes#

    RangeMeaning
    2xxSuccess. The envelope's success is true.
    4xxClient problem. Fix the request before retrying.
    5xxServer problem on our side.
    502 / 503 / 504Specifically signal a backing-service issue — see Errors.
    The API never returns 2xx with success: false. Status code and envelope agree.

    Common headers#

    HeaderDirectionPurpose
    X-API-KeyRequestAPI key — see Authentication.
    Content-TypeBothapplication/json for JSON endpoints.
    X-Request-IdResponseEnd-to-end tracing — see Request ID.
    X-Credit-CostResponseCredits charged for the request.
    X-Remaining-BalanceResponseCredits left on your account after the request.
    X-RateLimit-Limit / -Remaining / -ResetResponseStandard rate-limit metadata.

    Versioning#

    The current API version is v0.1.0.
    Endpoints follow a flat path layout (/api/companies/..., /api/persons/..., /api/stocks/...).
    Breaking changes to a resource will land under a versioned path (/api/v2/...) while the old version stays available during a deprecation window.
    Adding new fields to a response is not a breaking change. Clients should ignore unknown fields.
    Removing or renaming a field, or changing a field's type, is a breaking change and only happens with a new version.

    Pagination#

    List endpoints that support pagination accept limit and offset query (or body) parameters and return:
    {
      "success": true,
      "data": {
        "total": 1234,
        "items": [ /* ... */ ]
      }
    }
    Where pagination is not yet supported the endpoint returns its full result set.

    Date and time#

    All timestamps in responses are UTC, formatted as ISO 8601 with millisecond precision (e.g. 2026-04-30T13:42:55.123Z). Don't assume local time anywhere.

    Field naming#

    JSON field names are snake_case (request_id, uptime_seconds). HTTP header names follow the conventional Capitalized-Hyphenated form (X-Request-Id).

    Idempotency#

    GET and HEAD are safe and idempotent. POST search endpoints are read-only and idempotent in practice. Mutating endpoints will support idempotency keys via a header in a future version.

    Security headers#

    Every response carries standard security headers. You don't need to act on them, but expect to see things like Strict-Transport-Security, X-Content-Type-Options: nosniff, and a tight Content-Security-Policy.
    Modified at 2026-05-01 01:19:45
    Previous
    Request ID
    Next
    Liveness probe
    Built with