Skip to content

API reference

API discovery

Search the indexed financial API endpoints in natural language, and list the providers discovery covers.

Search endpoints

POST/api/v1/discover
API keyscope api:discover

Describe what you need in plain English and get the closest matches from ENTON's index of financial API endpoints. The query is embedded and compared against the index by vector similarity, highest score first.

Request

JSON body

FieldDescription
querystringrequiredWhat you want to do, up to 500 characters.up to 500 characters
topKintegerNumber of matches to return, 1 to 50.default 10 · 1 to 50
minScorenumberValidated and echoed. Matches are not currently filtered by it; filter on score yourself.default 0.7 · 0 to 1

Response

200 Matching endpoints, highest score first.

FieldDescription
endpointsarray of objectMatches.
endpoints[].providerstringProvider id, for example "alpaca".
endpoints[].providerNamestringDisplay name, or the id.
endpoints[].pathstringThe provider's endpoint path.
endpoints[].methodstringHTTP method. "GET" when the index has none.
endpoints[].descriptionstringWhat the endpoint does.
endpoints[].scorenumberSimilarity, 0 to 1.
endpoints[].relevancestringhigh above 0.9, medium above 0.7, low otherwise.one of "high", "medium", "low"
endpoints[].availablebooleanTrue when you have connected this provider to your ENTON account, or when you have connected none at all.
endpoints[].requiresAuthbooleanCurrently always true.
endpoints[].authTypestringHow the provider authenticates: "apiKey" or "oauth".
endpoints[].documentationstringLink to the provider's docs, when indexed.
endpoints[].exampleRequestobjectExample request, when indexed.
endpoints[].exampleResponseobjectExample response, when indexed.
endpoints[].requiredParamsarray of stringRequired parameters, when indexed.
endpoints[].optionalParamsarray of stringOptional parameters, when indexed.
endpoints[].rateLimitstringProvider rate limit, or "Unknown".
endpoints[].categoriesarray of stringCurrently always empty.
endpoints[].tagsarray of stringCurrently always empty.
metadataobjectRequest metadata.
metadata.totalFoundintegerNumber of matches returned.
metadata.querystringYour query.
metadata.topKintegerThe topK used.
metadata.minScorenumberThe minScore you sent.
metadata.responseTimeintegerMilliseconds this request took, measured by the API.
metadata.searchMethodstring"semantic".
metadata.providersSearchedarray of stringProviders that appear in the matches.
Example response
{
  "endpoints": [
    {
      "provider": "alpaca",
      "providerName": "alpaca",
      "path": "/v2/stocks/{symbol}/bars",
      "method": "GET",
      "description": "...",
      "score": 0.91,
      "relevance": "high",
      "available": true,
      "requiresAuth": true,
      "authType": "oauth",
      "requiredParams": [],
      "optionalParams": [],
      "rateLimit": "Unknown",
      "categories": [],
      "tags": []
    }
  ],
  "metadata": {
    "totalFound": 1,
    "query": "historical stock prices",
    "topK": 5,
    "minScore": 0.7,
    "responseTime": 640,
    "searchMethod": "semantic",
    "providersSearched": [
      "alpaca"
    ]
  }
}

Errors

StatusWhenerror
403The key has neither "api:discover" nor "*".Insufficient permissions. Required scope: api:discover
400query is missing or empty.Missing required field: query
400query is over 500 characters.Query too long. Maximum length is 500 characters
400topK is out of range.Invalid topK. Must be between 1 and 50
400minScore is out of range.Invalid minScore. Must be between 0 and 1
500The search failed, or the body was not valid JSON.Failed to discover APIs. Please try again.

Errors use the standard error body. Any request can also get the authentication errors (401) and the rate-limit error (429).

Examples

curl -X POST "https://enton.ai/api/v1/discover" \
  -H "Authorization: Bearer $ENTON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "get historical stock prices",
    "topK": 5
  }'

List discovery providers

GET/api/v1/discover
API keyany scope

A fixed list of the data providers discovery describes, with how each one authenticates. Needs a valid key; no scope is checked.

Request

No parameters and no body.

Response

200 The providers.

FieldDescription
providersarray of objectProviders.
providers[].namestringProvider id.
providers[].displayNamestringDisplay name.
providers[].descriptionstringWhat it offers.
providers[].categoriesarray of stringData categories.
providers[].authRequiredbooleanWhether you must connect it yourself.
providers[].authTypestring"oauth" or "apiKey".
totalProvidersintegerLength of providers.
Example response
{
  "providers": [
    {
      "name": "alpaca",
      "displayName": "Alpaca",
      "description": "Stock and crypto trading",
      "categories": [
        "trading",
        "stocks",
        "crypto"
      ],
      "authRequired": true,
      "authType": "oauth"
    },
    {
      "name": "finnhub",
      "displayName": "Finnhub",
      "description": "Market data and news",
      "categories": [
        "market-data",
        "news",
        "fundamentals"
      ],
      "authRequired": false,
      "authType": "apiKey"
    }
  ],
  "totalProviders": 5
}

Errors

Errors use the standard error body. Any request can also get the authentication errors (401) and the rate-limit error (429).

Examples

curl "https://enton.ai/api/v1/discover" \
  -H "Authorization: Bearer $ENTON_API_KEY"