MenuMore

ONE EVIDENCE STORE

Build with the BrytaLocals API

The website and mobile apps share the same accounts and PostgreSQL evidence. Public data requests need no database credentials.

Download the OpenAPI contract ↗ · Inspect the current release ↗ · Source status →

Version 1

GET /api/v1/version

Active evidence release and coverage counts

GET /api/v1/places?q=Chicago&state=IL

Paginated national place search

GET /api/v1/places/1714000

Place facts, observation periods and source links

GET /api/v1/local-areas?state=17&county=17031

Paginated national Census tracts; statistical areas distinct from named neighborhoods

GET /api/v1/local-areas/17031010100

Tract observations, demographic proportions, 90% margins and generalized map geometry

GET /api/v1/regions?kind=metro

State and metro profiles

GET /api/v1/metrics

Metric definitions and limitations

GET /api/v1/schools?state=IL&outcomes=true

Public-school directory and outcome availability

GET /api/v1/schools/{NCES_ID}

School directory record and integrated outcomes

GET /api/v1/news?place=1714000&days=30

Attributed reporting and freshness

GET /api/v1/sources

Source-check status

GET /api/v1/comparisons/{ID}

An unlisted permanent comparison

/api/v1/me/searches · preferences · comparisons · followings · devices

Research and device sessions owned by the signed-in account

Pagination and updates

List requests accept a limit from 1 to 100. Pass the returned nextCursor with the same query. Cursors are bound to the query and evidence release. A dataset_changed response means the client should restart the query and replace its cached pages.

Responses carry a data field and metadata. Evidence metadata includes the release ID, publication time and source period. ETags support conditional requests; private account responses are never publicly cached.

Signing in from a mobile app

  1. Create an S256 PKCE challenge and random state on the device.
  2. POST client_id, redirect_uri, code_challenge, code_challenge_method and state to /api/v1/auth/requests.
  3. Open authorizationUrl in the system browser. The user signs in with email or Google and explicitly connects the app.
  4. Verify returned state, then exchange the one-use code and code_verifier at /api/v1/auth/token.
  5. Use the 15-minute Bearer access token. Refresh tokens rotate; reuse revokes that device session. The session has a maximum 30-day lifetime.

Registered callbacks: com.brytalocals.ios:/oauth/callback and com.brytalocals.android:/oauth/callback. Native projects must register these schemes before device testing. Store credentials in platform secure storage. Password reset revokes mobile sessions alongside browser sessions.

Evidence rules

Unavailable and suppressed values are not zero. School results must retain exam, year and cohort; they do not establish attendance eligibility. Saved comparisons remain unlisted. Public source attribution must remain visible in clients.