API version 3.1 · Document version 2026-06-03
This document describes the HTTP/JSON API of sco-ldc, a web service that returns
quadratic limb-darkening coefficients (u1, u2) by trilinear interpolation of
published Claret coefficient tables, and that resolves exoplanet names to host-star stellar parameters
from the NASA Exoplanet Archive (NEA) and ExoFOP-TESS.
This reference is language-neutral and intended for any HTTP client (Java, JavaScript, Python, curl, etc.).
All requests are HTTPS GET. All response bodies are JSON. The API requires no authentication and accepts
unauthenticated cross-origin requests (CORS allow-origin is *).
All endpoints are served from https://sco-ldc.com. HTTPS is required; the service does not accept HTTP.
None. sco-ldc’s API is open and does not require API keys, tokens, registration, or any other credential. Any HTTP client can call any endpoint at any time.
All endpoints accept GET requests only. There is no POST, PUT, or DELETE. This reflects the read-only nature of the service: sco-ldc retrieves data and computes from it but does not store or modify state on behalf of callers.
All parameters are passed as URL query string parameters. There is no JSON request body.
Parameter names are case-sensitive. Numeric parameters can be passed as integers (5778) or as
decimals (5778.0); both are accepted. Filter codes are strings and case-sensitive.
All successful responses are JSON with HTTP status 200. The response Content-Type is
application/json. All field names use snake_case (e.g., filter_code, not
filterCode). Numeric fields are always JSON numbers (not strings); string fields are always
JSON strings (not numbers).
Filter codes containing special characters (the SDSS codes use an asterisk; planet names
typically contain spaces) must be URL-encoded in the request. Most HTTP client libraries handle this
automatically when parameters are passed as a structured dictionary or map rather than concatenated into the
URL string. If constructing URLs manually, ensure that asterisks become %2A and spaces become
%20 or +.
The API described here is treated as a stable contract. Once a caller integrates with sco-ldc, the following are guaranteed:
Additions are not considered breaking and may happen without coordination:
/api/v2/compute) rather than by modifying the existing endpoints. Callers can continue
using the current endpoints on their own timeline and migrate when convenient.
| Endpoint | Purpose |
|---|---|
GET /api/health | Liveness probe and cache freshness diagnostic |
GET /api/filters | Catalog of supported filters and their model coverage |
GET /api/resolve | Resolve an exoplanet name or TOI to host-star Teff/logg/[Fe/H] |
GET /api/compute | Compute (u1, u2) given Teff, logg, [Fe/H], filter, and model |
/api/filters once to discover what filters and models are available, with their grid ranges. Cache the result locally./api/resolve?planet=<NAME> to fetch host-star Teff/logg/[Fe/H] from a planet or TOI name./api/compute?teff=…&logg=…&feh=…&filter=…&model=… to obtain u1 and u2.Returns a status snapshot. Useful for liveness checks and for verifying that the underlying data sources are fresh before relying on a lookup.
Required parameters: none. · Optional parameters: none.
{
"status": "ok",
"version": "3.1.0",
"freshness": "ok",
"tables": {
"tableab.dat": 179645,
"table5.dat": 574,
"CBBQUADRATIC.txt": 7695
},
"filter_count": 26,
"nea_cache": { "count": 6287, "refreshed_utc": "2026-06-03 17:00 UTC" },
"exofop_cache": { "count": 7934, "refreshed_utc": "2026-06-03 17:00 UTC" }
}
| Field | Type | Notes |
|---|---|---|
status | string | Always ‘ok’ if the response was generated at all |
version | string | Server-side application version identifier |
freshness | string | ‘ok’ if both planet caches refreshed within 48 h; else ‘stale’ |
tables | object | Row counts per source file. Keys are file names; values are integers |
filter_count | integer | Number of distinct filters loaded (currently 26) |
nea_cache.count | integer | Rows currently held in the NEA planet cache |
nea_cache.refreshed_utc | string | Last successful live refresh; null if never refreshed |
exofop_cache.count | integer | Rows in the ExoFOP TOI cache |
exofop_cache.refreshed_utc | string | Same convention as NEA |
freshness field is the recommended signal to monitor. Callers do not need to act on ‘stale’ programmatically — the LDC computation continues to work — but it may be useful for diagnostic surfaces.Returns the catalog of filters available and, per filter, which stellar atmosphere models are populated
along with their parameter grid ranges. Calling /api/filters is the authoritative way to discover what’s
currently supported; new filters or new model coverage can appear in future versions.
Required parameters: none. · Optional parameters: none.
{
"filters": [
{
"code": "V",
"name": "Johnson V",
"category": "Johnson-Cousins",
"source": "CB2011",
"citation": "Claret & Bloemen (2011, A&A 529, A75)",
"models": [
{
"model": "ATLAS",
"model_key": "ATLAS",
"teff_min": 3500.0, "teff_max": 50000.0,
"logg_min": 0.0, "logg_max": 5.0,
"feh_min": -5.0, "feh_max": 1.0,
"feh_fixed": false,
"n_points": 7813
},
{
"model": "PHOENIX",
"model_key": "PHOENIX",
"teff_min": 2000.0, "teff_max": 9800.0,
"logg_min": 3.5, "logg_max": 5.0,
"feh_min": 0.0, "feh_max": 0.0,
"feh_fixed": true,
"n_points": 116
}
]
}
]
}
| Field | Type | Notes |
|---|---|---|
code | string | Filter code used in /api/compute. Case-sensitive |
name | string | Human-readable filter name |
category | string | Filter family: Johnson-Cousins, Sloan/SDSS, Strömgren, Space-based, Other |
source | string | Internal source tag: CB2011, C2018, C2021, or CMG2022 |
citation | string | Source’s bibliographic citation |
models | array | List of model entries (typically 1 or 2 per filter) |
| Field | Type | Notes |
|---|---|---|
model | string | Display name used in /api/compute’s model parameter |
model_key | string | Internal storage key; identical to model except for TESS (PHOENIX-COND displays as such but is stored as PHOENIX) |
teff_min/max | number | Grid extent in K. Inclusive bounds. Inputs outside fail |
logg_min/max | number | Grid extent in cgs dex |
feh_min/max | number | Grid extent in dex. For PHOENIX models, a single value at 0.0 |
feh_fixed | boolean | true if the grid has only one [Fe/H] value (solar metallicity only) |
n_points | integer | Total grid points populated for this filter+model combination |
model parameter to /api/compute accepts the display name from the model field. Accepted values are ‘ATLAS’, ‘PHOENIX’, and ‘PHOENIX-COND’. Not every filter supports every model; the models array per filter is the authoritative list.feh_fixed flag is true, passing a feh value other than 0.0 to /api/compute will be rejected. The default feh=0.0 works correctly.Looks up an exoplanet name or TESS Object of Interest (TOI) candidate identifier and returns host-star stellar parameters from the authoritative source (NEA for confirmed planets; ExoFOP-TESS for TOI candidates not in NEA).
| Name | Type | Notes |
|---|---|---|
planet | string | Planet name or TOI identifier. Case-insensitive on lookup |
Optional parameters: none.
WASP-23 bwasp-23 b (case-insensitive)HD 189733 bTRAPPIST-1 eTOI-700.01TOI 700.01 (TOI prefix can use a space or hyphen){
"found": true,
"planet": "WASP-23 b",
"hostname": "WASP-23",
"teff": 5150.0,
"logg": 4.4,
"feh": -0.05,
"source": "NEA",
"citation": "DOI: 10.26133/NEA13"
}
{
"found": false,
"planet": "<input as supplied>",
"reason": "not_in_nea",
"suggestions": ["WASP-23 b", "WASP-3 b", "WASP-43 b"]
}
This is only returned in a degraded mode (the server cache is empty and a live upstream query also failed). In normal operation this shape is not returned.
{
"found": false,
"planet": "<input as supplied>",
"reason": "error",
"error": "NEA query timed out"
}
| Field | Type | Notes |
|---|---|---|
found | boolean | true if the planet was resolved; false otherwise |
planet | string | Canonical planet name on success; raw input on failure |
hostname | string | Host star designation (e.g. ‘WASP-23’) |
teff | number / null | Effective temperature in K, or null if the source has no value |
logg | number / null | Surface gravity log g in cgs dex, or null |
feh | number / null | Metallicity [Fe/H] in dex, or null |
source | string | ‘NEA’ or ‘ExoFOP’. Tells the caller which database served this |
citation | string | Citation for the source database |
reason | string | On failure: ‘not_in_nea’, ‘not_in_exofop’, or ‘error’ |
suggestions | array<string> | On not_in_nea failure: up to 3 close-match planet names from NEA |
error | string | On error reason: a short human-readable explanation |
Computes quadratic limb-darkening coefficients (u1, u2) by trilinear interpolation of the Claret table corresponding to the requested filter and atmosphere model. This is the main computational endpoint.
| Name | Type | Notes |
|---|---|---|
teff | number | Effective temperature in K |
logg | number | Surface gravity log g in cgs dex |
filter | string | Filter code from the /api/filters catalog. Case-sensitive |
| Name | Type | Notes |
|---|---|---|
feh | number | Metallicity [Fe/H] in dex. Defaults to 0.0 if omitted |
model | string | ‘ATLAS’, ‘PHOENIX’, or ‘PHOENIX-COND’. Defaults to ‘ATLAS’ if omitted |
{
"u1": 0.5124,
"u2": 0.1558,
"filter_code": "i*",
"filter_name": "SDSS i'",
"model": "ATLAS",
"citation": "Claret & Bloemen (2011, A&A 529, A75)",
"grid": {
"teff_bracket": [5000.0, 5250.0],
"logg_bracket": [4.0, 4.5],
"feh_bracket": [-0.5, 0.0],
"fractions": { "teff": 0.4, "logg": 0.8, "feh": 0.9 },
"on_grid": false
}
}
(The numeric values above are illustrative; actual values from the live API may differ.)
{
"detail": "Invalid Input (Teff = 1500.0 K): The PHOENIX model does not support values of Teff below 2000 K."
}
| Field | Type | Notes |
|---|---|---|
u1 | number | First quadratic LDC |
u2 | number | Second quadratic LDC |
filter_code | string | The filter code that was used (echoes the input) |
filter_name | string | Human-readable filter name |
model | string | The model used (echoes/canonicalizes the input) |
citation | string | Source citation for the underlying Claret table |
grid.teff_bracket | [num, num] | The two grid Teff values bracketing the input |
grid.logg_bracket | [num, num] | Same for logg |
grid.feh_bracket | [num, num] | Same for [Fe/H] |
grid.fractions.teff | number | Interpolation fraction in [0, 1] along the Teff axis |
grid.fractions.logg | number | Same for logg |
grid.fractions.feh | number | Same for [Fe/H] |
grid.on_grid | boolean | true if the input falls exactly on a grid point (no interpolation) |
A summary of every error case the API can return:
| Scenario | HTTP status | Body shape |
|---|---|---|
| Healthy successful request | 200 | Endpoint-specific success shape |
| /api/resolve planet not found | 200 | { "found": false, … } (see /api/resolve) |
| /api/compute invalid input (out of range) | 400 | { "detail": "…" } |
| /api/compute unknown filter or model | 400 | { "detail": "…" } |
| Missing required query parameter | 422 | FastAPI default validation error shape |
| Render upstream outage (rare) | 502 / 503 | Render’s load balancer page, not JSON |
/api/compute
without a filter parameter), the response is HTTP 422 with FastAPI’s standard validation error shape, not HTTP 400.
The body in that case is {"detail": [{"loc": […], "msg": "…", "type": "…"}]}. Callers should
handle 422 alongside 400 as ‘client input was wrong.’
Callers should treat any non-2xx response as a generic failure unless they specifically want to surface the message from detail.
Both the NEA planet table and the ExoFOP TOI table are cached in-memory on the server and refreshed once daily
at 17:00 UTC. Callers do not need to invalidate or refetch on a faster cadence. Repeated /api/resolve calls for
the same planet within a session will return identical values until the next daily refresh.
The API has no enforced rate limits. The architecture handles dozens of requests per second comfortably. That said, individual workflows should not need more than a handful of calls per target, so this is not a real concern for normal use.
If sco-ldc is unreachable (Render outage, DNS failure, network partition), the appropriate caller behavior is to surface this to the user and fall back to manual entry. The server should not be assumed to be always available.
For occasional individual calls, connection management is a minor optimization. For higher-volume callers (a script processing many targets sequentially), it matters significantly: opening a fresh TLS connection per call adds 400–500 ms of handshake latency, while reusing an open connection eliminates this entirely. Most modern HTTP client libraries handle connection reuse via configured connection pools.
Connection timeout 10 seconds, read timeout 30 seconds. Compute calls typically respond in 50–100 ms; resolve calls take a similar amount for cached planets and may take several seconds for live fallback queries when the cache misses. The 30-second read timeout gives ample headroom for slow network conditions without aborting on transient blips.
Callers should ideally call /api/filters once per session (at startup, or lazily on first use) to
discover the supported filters and grid ranges, rather than hardcoding the filter list. New filters may be added in future
versions; calling /api/filters keeps the caller current automatically.
Each /api/resolve and /api/compute response includes a citation field. If a caller
surfaces LDC values to a user, including the citation alongside (or in a tooltip) is the appropriate attribution and makes
traceability straightforward. The two citations from a chained resolve+compute call are typically both needed for complete
attribution in a publication.
GET https://sco-ldc.com/api/health
$ curl https://sco-ldc.com/api/health
GET https://sco-ldc.com/api/filters
$ curl https://sco-ldc.com/api/filters
GET https://sco-ldc.com/api/resolve?planet=WASP-23+b
$ curl 'https://sco-ldc.com/api/resolve?planet=WASP-23%20b'
GET https://sco-ldc.com/api/resolve?planet=TOI-700.01
GET https://sco-ldc.com/api/compute?teff=5150&logg=4.4&feh=-0.05&filter=V&model=ATLAS
$ curl 'https://sco-ldc.com/api/compute?teff=5150&logg=4.4&feh=-0.05&filter=V&model=ATLAS'
GET https://sco-ldc.com/api/compute?teff=5150&logg=4.4&filter=V
Omitting feh defaults to 0.0; omitting model defaults to ATLAS.
To produce LDCs for WASP-23 b in Johnson V:
GET /api/resolve?planet=WASP-23+b returns teff, logg, feh values from NEA.GET /api/compute?teff=<…>&logg=<…>&feh=<…>&filter=V&model=ATLAS returns u1 and u2.The two-step chain is the canonical pattern for integrators (such as AstroImageJ) where the user supplies a planet name and the integration tool needs to populate LDCs automatically.
Source code repository: https://github.com/SCO-SCI/sco-ldc