# Quickstart

nyc-evidence answers research questions about New York City sidewalk injury and traffic accident law with **evidence objects**: propositions, the statutes and cases behind them, verbatim passages, and the relationships between them. Every object has a canonical URL, a content hash, and trust fields. Nothing here is legal advice.

Record pages can be read with no key. An evidence packet requires the access token from a paid checkout (`Authorization: Bearer`). Until that checkout can be charged, the packet routes answer `402 PAYMENT_REQUIRED`.

## 1. Ask a question and get an evidence packet

```bash
curl -s -X POST https://agents.newyorkeverydaylawreference.com/evidence-packets \
  -H 'Content-Type: application/json' \
  -d '{"question": "Who is liable for a defective sidewalk in NYC?", "as_of": "2024-06-01"}'
```

The response (`201 Created`, with `Location` set to the packet's URL) contains:

- `status`: `VERIFIED`, `UNVERIFIED_CANDIDATE`, `INSUFFICIENT_EVIDENCE`, `CONFLICTING_AUTHORITY`, or `TEMPORAL_UNCERTAINTY` ([statuses](https://agents.newyorkeverydaylawreference.com/docs/statuses)).
- `propositions`, `authorities`, `cases`, `sources`, `relationships`: compact evidence objects, each with a `cite_as` block and `trust` fields.
- `limitations`: what the packet does not cover, including `NOT_LEGAL_ADVICE` and `DATASET_UPDATES` on every packet. `DATASET_UPDATES` says this dataset is updated from time to time, so the same question can return a different packet later. Compare `provenance.dataset_version` and `provenance.dataset_hash`.
- `excluded`: records that were considered and left out, with the reason.
- `provenance`: the dataset version and hash, the normalized request, and `packet_hash`.

The same request against the same dataset always returns the same `packet_id` and body.

## 2. Pick the date the law applies

The rules changed on September 14, 2003, when Administrative Code § 7-210 shifted sidewalk liability from the City to most abutting owners. `as_of` picks the date:

```bash
curl -s -X POST https://agents.newyorkeverydaylawreference.com/evidence-packets -H 'Content-Type: application/json' \
  -d '{"question": "Who was liable for a sidewalk defect?", "as_of": "2002-06-01"}'
```

Without `as_of`, today's date is used.

Some rules turn on a different date. The 2026 amendments to the no-fault serious injury definition and to comparative fault in motor vehicle cases apply to lawsuits commenced on or after May 26, 2026, whatever the date of the accident, so for those questions `as_of` is the date the lawsuit was (or would be) commenced:

```bash
curl -s -X POST https://agents.newyorkeverydaylawreference.com/evidence-packets -H 'Content-Type: application/json' \
  -d '{"question": "What counts as a serious injury under the no-fault law?", "as_of": "2025-06-01"}'
```

## 3. Open any object

Every object has one canonical URL. The same URL serves JSON, Markdown, or HTML:

```bash
curl https://agents.newyorkeverydaylawreference.com/proposition/prop_nyc_sidewalk_abutting_owner_liability        # JSON (Accept: */*)
curl https://agents.newyorkeverydaylawreference.com/proposition/prop_nyc_sidewalk_abutting_owner_liability.md     # Markdown
open  https://agents.newyorkeverydaylawreference.com/proposition/prop_nyc_sidewalk_abutting_owner_liability       # HTML in a browser
```

## 4. Check a citation someone handed you

```bash
curl -s -X POST https://agents.newyorkeverydaylawreference.com/resolve -H 'Content-Type: application/json' \
  -d '{"citation": "https://agents.newyorkeverydaylawreference.com/proposition/prop_nyc_sidewalk_abutting_owner_liability",
       "content_hash": "sha256:..."}'
```

`status` is `current`, `revised`, `superseded`, `hash_mismatch`, `not_found`, or `version_not_found`. See [citation and portability](https://agents.newyorkeverydaylawreference.com/docs/citation).

## 5. Use it from an AI agent

Connect any MCP client to `https://agents.newyorkeverydaylawreference.com/mcp` (Streamable HTTP) or run `npm run mcp:stdio`. See [MCP](https://agents.newyorkeverydaylawreference.com/docs/mcp) for Cursor and Claude configuration.

## Run it yourself

```bash
git clone <this repo> && cd nyc-evidence
nvm use && npm ci
npm start            # https://agents.newyorkeverydaylawreference.com
npm run demo         # two agents: one researches over MCP, the other verifies every citation
```

## Next

- [API reference](https://agents.newyorkeverydaylawreference.com/docs/api) and [OpenAPI](https://agents.newyorkeverydaylawreference.com/openapi.json)
- [Trust fields](https://agents.newyorkeverydaylawreference.com/docs/trust)
- [Coverage](https://agents.newyorkeverydaylawreference.com/docs/coverage)
- [Acceptable use](https://agents.newyorkeverydaylawreference.com/docs/acceptable-use)
