// public api · v1

State standards, one call.

The Competencies API serves U.S. state academic standards for your organization. Codes and topics are metadata. Statement text is redacted while a cell is PUBLISH_METADATA_ONLY.

// 01

Quickstart

Create an organization and start Checkout, then redeem the claim token for an API key. The catalog has no free or trial tier. Lookup keys are partner-monthly, growth-monthly, and enterprise-monthly. Prices are Stripe test-mode Prices, not values in this API. The local server is http://localhost:8080.

1. Start signup

curl -X POST http://localhost:8080/v1/signup \
  -H "Content-Type: application/json" \
  -d '{"organizationName":"Northwind","priceLookupKey":"partner-monthly"}'

Save claimToken. It is shown once. Open checkoutUrl and pay with a Stripe test card. The organization stays suspended until the signed webhook customer.subscription.created (or updated) activates it. Then redeem:

curl -X POST http://localhost:8080/v1/signup/api-key \
  -H "Content-Type: application/json" \
  -d '{"claimToken":"gsc_paste_the_claim_token"}'

The JSON token is the API key, shown once and stored only as a hash. A second redeem of the same claim is 404 signup_not_found, the same code as an unknown claim. 409 payment_pending means the webhook has not activated the org yet — retry. Signup is limited per client IP (429 signup_throttled, Retry-After). Organization names are not unique and are not looked up, so signup does not reveal whether a name is taken.

2. Call the API

curl "http://localhost:8080/v1/standards?state=NE&subject=science" \
  -H "Authorization: Bearer $COMPETENCIES_API_KEY"

JavaScript

const res = await fetch(
  "http://localhost:8080/v1/standards?state=NE&subject=science",
  { headers: { Authorization: `Bearer ${process.env.COMPETENCIES_API_KEY}` } },
);
console.log(await res.json());

Python

import os, urllib.request
req = urllib.request.Request(
    "http://localhost:8080/v1/standards?state=NE&subject=science",
    headers={"Authorization": f"Bearer {os.environ['COMPETENCIES_API_KEY']}"},
)
print(urllib.request.urlopen(req).read().decode())

A metadata-only page looks like this. externalCode and topic are from the Nebraska science extract (SC.K.1.1.a). Statement text is not included.

{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "frameworkVersionId": "00000000-0000-4000-8000-000000000002",
      "externalCode": "SC.K.1.1.a",
      "statementPreview": null,
      "topic": "Forces and Interactions: Pushes and Pulls",
      "nodeType": "standard",
      "depth": 2,
      "ordinal": 1,
      "licenseState": "PUBLISH_METADATA_ONLY",
      "contentRedacted": true
    }
  ]
}
A known state and subject with nothing onboarded yet returns 200 and an empty items array. Pass nextCursor back as cursor. On the last page nextCursor is omitted. Do not build cursors. Prefixes inside the opaque token are o:, k:, c:, j:, u:, f:, v:, and r:.
// 02

Authentication

Send the key as Authorization: Bearer. There is no X-Api-Key header. A missing credential is 401 unauthorized. An invalid key is the same code, and the reason is not echoed. The signed CSV download (GET /v1/exports/{id}/download?token=) does not use the API key.

ScopeRoutes
standards:readCatalog, standards, education map
search:readGET /v1/search
graduation:readGraduation requirements
exports:createCreate and poll exports
usage:readGET /v1/usage
billing:managePOST /v1/billing/portal (Stripe Customer Portal: upgrade, downgrade, cancel)

A handler without the required scope is 403 forbidden. Too many invalid keys from the same client IP (and key prefix, when the token parses) return 429 auth_throttled with Retry-After, before the key hash is checked again.

// 03

Rate limits and tiers

Billable reads reserve monthly read units before the handler runs, then a per-key sustained rate in the same database. Search costs 5 units. Other /v1 reads cost 1. GET /v1/usage and export routes cost 0 read units (exports spend an export entitlement instead). Non-2xx responses refund the reservation, including 304 and 429.

Authenticated responses that reach an entitlement send RateLimit-Limit (requests per minute, sustained rate × 60), RateLimit-Reset (Unix seconds), and RateLimit-Remaining when the one-second burst bucket was touched. GET /v1/usage is the monthly readout: tier, consumed and remaining units, rateLimitPolicy (including requestsPerMinute), and nextResetAt. Every response also sends X-Request-Id.

HTTPCodeWhen
429rate_limitedSustained rate. Retry-After is seconds.
429quota_exceededMonthly read units. Retry-After is seconds until the next UTC month. RateLimit-Remaining is omitted.
429signup_throttledToo many POST /v1/signup attempts from one client IP.
429auth_throttledFailed-key throttle. Includes Retry-After.
403entitlement_suspendedEntitlement missing or not active.
403search_not_includedSearch is off for the plan.
403historical_version_not_includedversion is set and the plan has no historical access.
503service_unavailableRate-limit store failed closed.

Catalog defaults below are what a new organization receives. An admin override or contract can differ, so GET /v1/usage is authoritative for the key you hold. Checkout resolves a Stripe test-mode Price by lookup key. This API does not store or display a dollar amount. The catalog has no free or trial tier. INTERNAL is not sold.

Payment failed: the subscription stays usable in grace (default 14 days), then the daily sweep suspends it (403 entitlement_suspended). Subscription deleted or canceled: access ends (cancelled), with no downgrade onto a free plan. Portal: POST /v1/billing/portal with billing:manage.

TierLookup keyPer minuteSustained / secMonthly read unitsExports / monthExport row cap
INTERNALnot sold120020200000000
PARTNERpartner-monthly60010500000550000
GROWTHgrowth-monthly300050500000025250000
ENTERPRISEenterprise-monthly12000200200000002002000000
Per minute is sustained rate × 60 from EntitlementDefaults. The bucket refills every second at the sustained rate; it does not grant a full minute of burst. Enterprise numbers are a documented ceiling until an admin sets a contract-specific override. Search and historical versions are included on all four catalog tiers. A tier change rewrites those limits and deletes the organization's rate-limit buckets so the next request uses the new values.
// 04

Coverage

Counts are read from coverage.json, regenerated from source-registry.json. This page does not embed a coverage total.

Loading coverage…

An official national adoption (method OFFICIAL_DECLARATION) is one covered cell. GET /v1/frameworks includes adoption with the evidence URL, the canonical national version, and additionsFrameworkVersionId when the state added its own nodes. A standards read without version returns the canonical nodes plus those additions. A version query returns only that version. Live catalogs are GET /v1/jurisdictions and GET /v1/subjects (an API key is required).
Statemathematicselasciencesocial-studies
// 05

Errors

Non-2xx JSON uses one envelope. details appears only when a code needs structured context. requestId matches X-Request-Id.

{
  "code": "invalid_cursor",
  "message": "The pagination cursor is invalid.",
  "requestId": "req-1"
}
StatusCodeMeaning
400invalid_cursorMalformed or cross-endpoint cursor.
400conflicting_parametersMutually exclusive filters together, such as state and jurisdictionId.
400incomplete_parametersOnly one of state and subject.
400ambiguous_frameworkThe pair matches more than one framework. Use frameworkId.
400invalid_version_selectorVersion is not a framework-version id.
401unauthorizedMissing or invalid API key.
404jurisdiction_not_found / subject_not_found / framework_not_foundUnknown code or id. Cross-tenant guesses are also 404.
409version_not_verifiedThe version exists and is not verified.
413export_too_largeExport estimate exceeds the plan row ceiling.
// 06

Changelog and versioning

Published contract version: … (openapi.yaml info.version).

Additive changes (new optional fields, new routes, new error codes) ship on /v1 without a path version bump. Removing or renaming fields, changing status codes, or tightening required parameters requires /v2. Admin routes and Stripe webhooks are not in the public document.

VersionNotes
1.0.0Customer /v1 contract: catalog, standards, search, graduation, usage, exports, signup, and the billing portal link.