Observed since 21 Oct, 11:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Official Python SDK for the AI Law Tracker API — audited AI-regulation data (US state + federal, EU, global) in three lines.
Official Python client for the AI Law Tracker API — the audited dataset of AI regulation across US state + federal, the EU, and global jurisdictions. Laws, news, changelogs, obligations, penalties, compliance assessment, deadlines, and webhooks.
pip install ai-law-tracker
from ai_law_tracker import Client
alt = Client() # anonymous tier; no key required
laws = alt.laws.list(scope="federal") # -> a Page of records
for law in laws:
print(law["identifier"], "—", law["title"])
The API has a free anonymous tier (rate-limited by IP). For higher limits, richer fields, and the changelog/webhook endpoints, use a free API key (no card required):
from ai_law_tracker import Client
# 1) Issue a free key by email (anonymous call is fine)
Client().account.create_key("you@example.com") # emails you a key
# 2) Use it — explicitly, or via the ALT_API_KEY env var
alt = Client(api_key="alt_live_...")
print(alt.account.get()) # your tier, limits, and live usage
Set ALT_API_KEY in your environment and Client() picks it up automatically.
Paid tiers ($29 / $99 / $299 a month) raise quotas and unlock Pro-only endpoints
— see https://ai-law-tracker.com/pricing.
List endpoints return a Page you can iterate, index, and len(), plus
.total, .limit, .offset, and .has_more:
page = alt.laws.list(scope="state", jurisdiction="colorado", limit=50)
print(page.total, "records match;", len(page), "on this page")
To sweep every matching record without managing offsets yourself, use
.iterate(...) — it pages transparently and yields one record at a time:
for law in alt.laws.iterate(scope="eu", in_force=True):
...
for hit in alt.search.iterate("facial recognition", scope="state"):
...
Grouped as resources on the client:
| Resource | Methods |
|---|---|
alt.laws | list, iterate, get(id), history(id), sources(id), citations(id) |
alt.search | query(q, ...), iterate(q, ...) |
alt.news | list, iterate |
alt.changes | list, iterate (poll since= for what changed) |
alt.feed | list (lean recent-changes stream) |
alt.jurisdictions | list, countries, states |
alt.sectors | list, get(sector) |
alt.compliance | obligations, penalties, assess, report |
alt.deadlines | list (JSON or iCal via format="ical") |
alt.bills | list, get(slug) |
alt.webhooks | list, get(id), create, delete (Pro+) |
alt.account | get, revoke, create_key(email), create_token(email) |
| top level | alt.health(), alt.accuracy(), alt.categories(), alt.openapi() |
Examples:
# Poll the changelog for everything that moved since a timestamp
changes = alt.changes.list(since="2026-07-01T00:00:00Z", scope="federal")
# Compliance obligations for a sector + jurisdiction
obs = alt.compliance.obligations(jurisdiction="colorado", sector="hr")
# Risk assessment from a company profile
result = alt.compliance.assess(state="CA", sector="hr", aiUse="resume_screening")
# Upcoming compliance deadlines as an iCal feed (text/calendar)
ics = alt.deadlines.list(scope="eu", format="ical")
Every non-2xx response raises a typed exception carrying .status, .code,
.message, and .docs:
from ai_law_tracker import NotFoundError, RateLimitError, AuthenticationError
try:
alt.laws.get("does-not-exist")
except NotFoundError as e:
print(e.code, e.message)
except RateLimitError as e:
print("retry after", e.retry_after, "seconds")
All inherit from ALTError. Transient failures (timeouts, 5xx, 429) on
GET/DELETE are retried automatically with exponential backoff (configurable
via Client(max_retries=...)).
Client(
api_key=None, # or set ALT_API_KEY
base_url="https://ai-law-tracker.com/api/v1",
timeout=30.0, # seconds
max_retries=2, # transient GET/DELETE retries
)
Client is a context manager (with Client() as alt: ...) and has .close()
to release the connection pool.
This SDK is designed to be a well-behaved API citizen and does not provide any way to bypass the server's tier gating or rate limits:
max_retries=2), exponential
backoff with jitter, and only on idempotent GET/DELETE. Writes/POSTs are
never retried automatically.429 responses and their Retry-After header are respected; a persisted
rate limit surfaces as a RateLimitError (with .retry_after) rather than
being retried away.iterate(...) pages one page at a time, in order, through the same
rate-limited transport. It is a convenience for legitimate paging, not a bulk
scraper — please honour your tier's quotas.If you need high-volume or bulk access, use an appropriate paid tier or contact hello@ai-law-tracker.com rather than working around the limits.
ai-law-tracker on npmMIT (SDK code). API data is CC BY 4.0 — attribution required, informational only, not legal advice.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 23 Jul 2026 | 4 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 11:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:0aadf982a8eeed1d9b885c2c02841f75a04657ac6bdffc73ef522c3ba38eca64