# Eproc2 Bihar — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access live tender listings from the Bihar Government e-Procurement portal to search and filter government contracts by department, status, and keywords. Get detailed tender information including specifications and deadlines, plus browse the complete directory of participating government departments.

**Category:** Government & Public Data | **Website:** [eproc2.bihar.gov.in/](https://eproc2.bihar.gov.in/) | **Docs:** [parse.bot/marketplace/cf56d9c3-dccc-46f6-a407-3707605b7248/eproc2-bihar-gov-in-api](https://parse.bot/marketplace/cf56d9c3-dccc-46f6-a407-3707605b7248/eproc2-bihar-gov-in-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_active_tenders

Retrieves all currently active/open tenders from Bihar e-Procurement. Returns the full set (typically 500-1000+) in a single response. Supports server-side filtering by department ID and client-side keyword text search against description and reference number. Each tender includes schedule dates, status, and department info but not PAC amount (use get_tender_details for full financial data).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dept_id` | string | No | Department ID to filter tenders (e.g. '731' for Water Resources Department, '945' for Road Construction Department). Obtain IDs from get_departments endpoint. |
| `text_filter` | string | No | Keyword to filter tenders by description or reference number (client-side, case-insensitive) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/get_active_tenders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dept_id":"<string>","text_filter":"<string>"}'
```

### get_cancelled_tenders

Retrieves cancelled tenders. The full dataset can be very large (thousands of records); filtering by dept_id is strongly recommended to reduce response size. Includes cancellation date and reason for each tender.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dept_id` | string | No | Department ID to filter tenders (strongly recommended to reduce response size) |
| `text_filter` | string | No | Keyword to filter tenders by description or reference number (client-side, case-insensitive) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/get_cancelled_tenders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dept_id":"<string>","text_filter":"<string>"}'
```

### get_departments

Retrieves all government departments and organizations in Bihar that publish tenders. Returns a flat list with hierarchy information (parent_id, hierarchy string). Use department_id values to filter tenders in other endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/get_departments \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_past_tenders

Retrieves past/closed tenders whose bid end date has passed. Supports server-side pagination and filtering by department ID. Client-side keyword filtering on description and reference number. Returns a page of results with a has_more flag for continuation.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `dept_id` | string | No | Department ID to filter tenders |
| `page` | integer | No | Page number (1-based) |
| `page_size` | integer | No | Number of tenders per page |
| `text_filter` | string | No | Keyword to filter tenders by description or reference number (client-side, case-insensitive) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/get_past_tenders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dept_id":"<string>","page":"<integer>","page_size":"<integer>","text_filter":"<string>"}'
```

### get_tender_details

Retrieves comprehensive details for a specific tender by its numeric ID, including PAC amount, NIT text, schedule dates, currency, bid configuration, and offer validity. The tender_id can be obtained from any of the listing endpoints (get_active_tenders, get_past_tenders, get_cancelled_tenders).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tender_id` | string | Yes | Numeric tender ID (e.g. '133124'). Obtain from tender listing endpoints. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-eproc2-bihar-gov-in-api-cf56d9c3/get_tender_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tender_id":"<string>"}'
```
