# /udbud/tenders/search

`POST /api/udbud/tenders/search`

Price: 20 credits

Search udbud.dk notices — expected purchases, market consultations, prior information notices, EU and national below-threshold competitions, direct awards, contract awards and modifications of Danish contracting authorities — by keyword, open status, notice kind, contract type, procedure, SME suitability, buyer, CPV code, publication date, tender deadline and estimated value, with the buyer, main CPV code, estimated value, deadlines and TED publication number of each notice.

## How to use it

A query returns at most its first 5,000 hits, so narrow a wide search with published_from/published_to to reach the tail. With a keyword, the relevance order returns at most 100 results; the other orders reach 5,000. Without a keyword, relevance order is newest first. The deadline orders list notices with a tender deadline first and the others after them, newest first. Notices without a ted_publication_number are published only on udbud.dk, such as national below-threshold competitions and expected purchases. buyer takes the CVR numbers udbud/buyers/search returns; pass the id of a row to udbud/tenders for the lots, results, winners and organisations.

## 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 results (min: 1; max: 5000)
- `keyword` (string, nullable) — Full-text keyword (examples: "rengøring"; minLength: 1)
- `active_only` (boolean) — Only notices still open for tenders or requests (default: false)
- `form_type` (array, nullable) — Notice kinds to include (one of: "expected_purchase", "market_consultation", "prior_information", "eu_competition", "national_competition", "direct_award", "award", "contract_modification"; minItems: 1)
- `contract_type` (array, nullable) — Contract types to include (one of: "works", "services", "supplies"; minItems: 1)
- `procedure` (array, nullable) — Procedure types to include (one of: "open", "restricted", "negotiated_with_call", "negotiated_without_call", "competitive_dialogue", "innovation_partnership", "competitive_tendering", "other_single_stage", "other_multi_stage"; minItems: 1)
- `sme_suitable` (boolean, nullable) — Suitability for small and medium-sized enterprises
- `buyer` (array, nullable) — Buyer CVR numbers from udbud/buyers/search (examples: ["29189889"]; minItems: 1)
- `cpv` (array, nullable) — CPV codes or code prefixes (examples: ["90910000"], ["9091"]; minItems: 1)
- `published_from` (string, nullable) — Earliest publication date, inclusive (examples: "2026-09-01")
- `published_to` (string, nullable) — Latest publication date, inclusive (examples: "2026-09-10")
- `deadline_from` (string, nullable) — Earliest tender deadline date, inclusive (examples: "2026-10-01")
- `deadline_to` (string, nullable) — Latest tender deadline date, inclusive (examples: "2026-10-10")
- `value_min` (number, nullable) — Minimum estimated value (examples: 1000000; min: 0)
- `value_max` (number, nullable) — Maximum estimated value (examples: 5000000; min: 0)
- `currency` (string) — Currency of value_min and value_max (default: "DKK"; one of: "DKK", "EUR")
- `sort` (string) — Result order; relevance with a keyword returns at most 100 results (default: "newest"; one of: "relevance", "newest", "oldest", "deadline_earliest", "deadline_latest")

## Response

### 200 — Successful Response

- `@type` (string) (default: "UdbudTenderSummary")
- `id` (string, required)
- `notice_id` (string, required)
- `version` (string, nullable)
- `ted_publication_number` (string, nullable)
- `description` (string, nullable)
- `form_type` (string, nullable)
- `form_type_label` (string, nullable)
- `notice_subtype` (string, nullable)
- `notice_subtype_label` (string, nullable)
- `is_amendment` (boolean, nullable)
- `buyer` (object, nullable)
  - `@type` (string) (default: "UdbudBuyer")
  - `cvr` (string, nullable)
  - `raw_id` (string, nullable)
  - `name` (string, required)
- `buyer_names` (array) (default: [])
- `cpv` (object, nullable)
  - `@type` (string) (default: "UdbudCode")
  - `code` (string, required)
  - `name` (string, nullable)
- `cpv_name_en` (string, nullable)
- `estimated_value` (object, nullable)
  - `@type` (string) (default: "UdbudValue")
  - `amount` (number, nullable)
  - `currency` (string, nullable)
  - `text` (string, nullable)
- `published_date` (string, nullable)
- `deadlines_at` (array) (default: [])
- `expected_start_date` (string, nullable)
- `country` (string) (default: "DK")
- `url` (string, required)

## Errors

### 422 — Validation Error

A filter value udbud.dk does not accept

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

The entity was not found, or a precondition failed

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.

