# localcontracts.search

Contracts and tender notices of US cities and state authorities from their official open data: what is bought, agency, supplier, amount, dates and stage.

US city and state contracts, one of the US city and state contracts scrapers.

| | |
| --- | --- |
| Id | `localcontracts.search` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/localcontracts.search/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `source` | "chicago" \| "new_york_city" \| "mta" | yes | The source: `chicago`, `new_york_city` or `mta`. |
| `query` | string | no | Only rows whose title holds this text. Limit: at most 100 characters. |
| `supplier` | string | no | Only rows whose supplier's name holds this text. Limit: at most 100 characters. |
| `agency` | string | no | Only rows of a department or agency whose name holds this text, where the source names one. Limit: at most 100 characters. |
| `stage` | "any" \| "tender" \| "intent_to_award" \| "award" | no | `tender`, `intent_to_award`, `award` or `any`. Only `new_york_city` publishes open tenders; the others publish awards. Default: `"any"`. |
| `date_from` | string | no | Only rows approved, awarded or published on or after this day, `YYYY-MM-DD`. |
| `date_to` | string | no | Only rows approved, awarded or published on or before this day, `YYYY-MM-DD`. |
| `max_results` | integer | no | Rows a page, newest first, at most 200. Limit: 1 to 200. Default: `25`. |
| `offset` | integer | no | How many rows to skip, to read the next page. Limit: 0 to 50000. Default: `0`. |

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `source` | string | The source's key: `chicago`, `new_york_city` or `mta`. |
| `source_name` | string | The source's name. |
| `state` | string | The US state, as two letters. |
| `notice_id` | string | The contract's or the notice's number at the source. |
| `revision` | string or null | The contract's revision, where the source numbers them (Chicago: `0` for the contract as awarded, then one a change), so `notice_id` and `revision` together name one row. |
| `reference` | string or null | The procurement's reference (PIN), where the source has one. |
| `url` | string or null | The notice's or contract's own page or document, where the source gives one. |
| `stage` | string | `tender` (open for bids), `intent_to_award`, or `award` (a contract made). |
| `title` | string or null | What is being bought. |
| `notice_type` | string or null | The type of contract or notice, in the source's words. |
| `category` | string or null | The category, where the source has one. |
| `method` | string or null | How it is or was procured, in the source's words. |
| `status` | string or null | The contract's status, where the source has one. |
| `agency` | string or null | The department or agency buying. |
| `supplier` | string or null | The business awarded it. |
| `amount` | number or null | The amount, in US dollars. |
| `published_date` | string or null | The day it was approved, awarded or published, `YYYY-MM-DD`. |
| `deadline_date` | string or null | The day bids are due, `YYYY-MM-DD`, for an open tender. |
| `start_date` | string or null | The contract's start, `YYYY-MM-DD`. |
| `end_date` | string or null | The contract's end, `YYYY-MM-DD`. |
| `source_url` | string | The source's public page for this data. |
| `fetched_at` | string (date-time) | When the portal was asked, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/localcontracts.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"source":"chicago","date_from":"2026-10-01","max_results":3}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "localcontracts.search",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "source": "chicago",
    "date_from": "2026-10-01",
    "max_results": 3
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "source": "chicago",
      "source_name": "City of Chicago",
      "state": "IL",
      "notice_id": "373716",
      "revision": "0",
      "reference": null,
      "url": null,
      "stage": "award",
      "title": "DFSS-ECBG-CS-CEL:",
      "notice_type": "DELEGATE AGENCY",
      "category": null,
      "method": null,
      "status": null,
      "agency": "DEPARTMENT OF FAMILY AND SUPPORT SERVICES",
      "supplier": "REACH FOR THE STARS CHILDCARE ACADEMY INC.",
      "amount": 119552,
      "published_date": "2026-11-21",
      "deadline_date": null,
      "start_date": null,
      "end_date": null,
      "source_url": "https://data.cityofchicago.org/d/rsxa-ify5",
      "fetched_at": "2026-11-24T19:54:15.834536Z"
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the US city and state contracts scrapers](https://docs.enrichednow.com/results-and-statuses.md#us-city-and-state-contracts) are in their own section there.
