# /universitaly/programs/search

`POST /api/universitaly/programs/search`

Price: 5 credits

Search the Italian national catalogue of accredited university and AFAM (art, music and dance) degree programmes by keyword, degree type, length, disciplinary area, degree class, language, admission type, delivery mode and province. Each programme carries its institution, degree type, length, language, degree class and the programme's own web page; university programmes found by filters add admission type, access basis, teaching and delivery mode

## How to use it

Without keyword the catalogue is filtered exactly and university programmes come before AFAM ones. keyword returns closest matches first with fewer fields per programme (no admission, access basis, teaching or delivery mode) and combines only with institution_type and count. AFAM programmes never carry admission, access basis, teaching or delivery mode.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `count` (integer, required) — Max number of programmes to return (min: 1; max: 6000)
- `keyword` (string, nullable) — Words matched against programme names, closest matches first (examples: "informatica")
- `institution_type` (string, nullable) — Only university programmes or only AFAM (art, music and dance) programmes (one of: "university", "afam")
- `degree_type` (array, nullable) — Degree types to include (one of: "bachelor", "master", "single_cycle"; examples: ["bachelor","master"])
- `duration_years` (array, nullable) — Programme lengths in years to include (one of: 2, 3, 5, 6; examples: [5,6])
- `area` (string, nullable) — Disciplinary area of the programme (one of: "Mathematics and computer sciences", "Physical sciences", "Chemical sciences", "Earth sciences", "Biological sciences", "Medical sciences", "Agricultural and veterinary sciences", "Civil engineering, architecture and design", "Industrial and information engineering", "Ancient, philological-literary and historical-artistic sciences", "Historical, philosophical, pedagogical and psychological sciences", "Legal sciences", "Economics and statistics", "Political and social sciences", "Music")
- `degree_class` (string, nullable) — Ministerial degree class code (examples: "L-31", "LM-18")
- `language` (array, nullable) — University programmes taught in these languages (one of: "italian", "english"; examples: ["english"])
- `admission_type` (array, nullable) — University programmes with these admission types (one of: "open", "admission_test", "limited_places"; examples: ["open"])
- `delivery_mode` (array, nullable) — University programmes delivered in these modes (one of: "in_person", "blended", "mostly_remote", "remote"; examples: ["remote"])
- `province` (string, nullable) — Two-letter Italian province code of AFAM programmes (examples: "MI", "RM")
- `sort` (string, nullable) — Order by programme name (one of: "name_asc", "name_desc")

## Response

### 200 — Successful Response

- `@type` (string) (default: "UniversitalyProgram")
- `id` (integer, nullable)
- `institution_type` (string, required) (one of: "university", "afam")
- `name` (string, required)
- `name_en` (string, nullable)
- `institution_name` (string, nullable)
- `institution_id` (integer, nullable)
- `institution_code` (string, nullable)
- `website_url` (string, nullable)
- `academic_year` (string, nullable)
- `degree_type` (string, nullable)
- `degree_type_en` (string, nullable)
- `degree_type_id` (integer, nullable)
- `duration_years` (integer, nullable)
- `language` (string, nullable)
- `area_code` (string, nullable)
- `area` (string, nullable)
- `degree_class` (object, nullable)
  - `@type` (string) (default: "UniversitalyDegreeClass")
  - `id` (integer, nullable)
  - `code` (string, nullable)
  - `name` (string, nullable)
  - `level` (string, nullable)
  - `previous_class_id` (integer, nullable)
  - `total_credits` (integer, nullable)
  - `category` (integer, nullable)
  - `characterising_field_count` (integer, nullable)
  - `area_id` (integer, nullable)
  - `cun_area` (integer, nullable)
- `interclass` (object, nullable)
  - `@type` (string) (default: "UniversitalyDegreeClass")
  - `id` (integer, nullable)
  - `code` (string, nullable)
  - `name` (string, nullable)
  - `level` (string, nullable)
  - `previous_class_id` (integer, nullable)
  - `total_credits` (integer, nullable)
  - `category` (integer, nullable)
  - `characterising_field_count` (integer, nullable)
  - `area_id` (integer, nullable)
  - `cun_area` (integer, nullable)
- `access_basis` (string, nullable)
- `admission_type` (string, nullable)
- `teaching_mode` (string, nullable)
- `delivery_mode` (string, nullable)
- `delivery_mode_code` (string, nullable)
- `delivery_mode_en` (string, nullable)
- `is_interuniversity` (boolean, nullable)
- `city` (string, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No programme matches this combination of filters, or the degree class code is unknown

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

