# Pbinfo — 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.

> Search and browse programming problems from pbinfo.ro, a Romanian informatics learning platform, with detailed information including problem statements, constraints, and metadata. Discover problems by keyword search or explore them by category with easy pagination through organized collections.

**Category:** Education | **Website:** [www.pbinfo.ro/articole/16/subiecte-de-la-examene](https://www.pbinfo.ro/articole/16/subiecte-de-la-examene) | **Docs:** [parse.bot/marketplace/f1f4de09-9248-4c1d-9bcb-b7e6076b8ed9/pbinfo-ro-api](https://parse.bot/marketplace/f1f4de09-9248-4c1d-9bcb-b7e6076b8ed9/pbinfo-ro-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-pbinfo-ro-api-f1f4de09/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_problem

Get detailed information about a specific programming problem by its numeric ID. Returns the full problem statement, metadata (class level, difficulty, time/memory limits, author), category breadcrumbs, tags, and count of submitted solutions. The problem_id can be obtained from search_problems or list_problems results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `problem_id` | string | Yes | Numeric problem ID (e.g. '255' for Fibonacci, '4906' for numere_p10). Can be obtained from search_problems or list_problems results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pbinfo-ro-api-f1f4de09/get_problem \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"problem_id":"<string>"}'
```

### list_problems

List programming problems within a specific category. Returns paginated results with 10 problems per page. Use the start parameter (offset) to paginate through results. Each problem includes id, name, URL, summary text, and difficulty level.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Numeric category ID from the site (e.g. '7' for Structuri repetitive, '5' for Cifrele unui numar, '18' for Divizibilitate). Corresponds to the tag ID in the site URL. |
| `start` | string | No | Zero-based offset for pagination. Each page shows 10 problems, so use 0, 10, 20, etc. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pbinfo-ro-api-f1f4de09/list_problems \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","start":"<string>"}'
```

### search_problems

Full-text search over the problem catalog via autocomplete. Returns matching problem names and IDs ranked by relevance. Server returns up to ~30 top matches; no pagination. Each result carries the numeric problem ID usable with get_problem.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `term` | string | Yes | Search term to find problems by name (e.g. 'fibonacci', 'matrice', 'sortare'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-pbinfo-ro-api-f1f4de09/search_problems \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"term":"<string>"}'
```
