Kosmobids Public API

Find and qualify tenders

Run a targeted search, hydrate the results, and decide which opportunities are worth pursuing.

This tutorial turns a search response into a shortlist. The API returns IDs and relevance signals; qualification happens when you combine them with the tender detail and your own commercial rules.

Start with the constraints that actually matter. A common shape is CPV codes plus a country and a deadline window:

{
  "criteria": {
    "cpvCodes": [
      { "code": "72000000", "includeDescendants": true }
    ],
    "contractingCountry": ["DE", "AT"],
    "submissionDeadlineAtLeastDays": 14
  },
  "options": {
    "type": "mixed",
    "recommendedFilter": "all",
    "sort": "deadline",
    "sortDir": "asc"
  }
}

Add minContractValueEur or maxContractValueEur only when the request explicitly needs a value constraint. Adding a value filter by default silently hides opportunities with an undisclosed value unless skipUnknownValue is set.

Do not combine relative and absolute windows:

  • submissionDeadlineAtLeastDays cannot be combined with submissionDeadlineAfter or submissionDeadlineBefore.
  • publishedDaysAgo cannot be combined with publishedAfter or publishedBefore.
curl -s -X POST "$KOSMOBIDS_BASE_URL/search" \
  -H "x-api-key: $KOSMOBIDS_API_KEY" \
  -H "content-type: application/json" \
  -d @search.json | jq '.data.results'
[
  {
    "id": "0f8fad5b-d9cb-469f-a165-70867728950e",
    "score": 0.82,
    "rerankingScore": 0.91,
    "recommended": true,
    "match": true
  },
  {
    "id": "1d2e3f40-...",
    "score": 0.74,
    "rerankingScore": 0.79,
    "recommended": false,
    "match": true
  }
]

Ad-hoc search is bounded. For a repeatable or larger evaluation, create a saved search and run it; runs add fit classification, final scores, and reasoning.

3. Hydrate the results

The search response contains only IDs and scores. Fetch the tender details in parallel (using the api helper from the quickstart):

async function hydrate(results: Array<{ id: string }>) {
  return Promise.all(results.map((result) => api(`/tenders/${result.id}`)));
}

Each detail contains the fields you need to qualify:

Field Use
title, description Confirm the actual scope.
cpv_codes Verify the classification beyond the search filter.
estimated_value / estimated_value_eur Check commercial size.
submission_date Confirm the deadline and timezone.
contracting_authority_country / contracting_country_iso Confirm geography.
language Check whether you can respond in the required language.
source_tender Read the notice-level title and source ID.

4. Apply a qualification checklist

A practical shortlist combines API signals with your own rules:

Question Signal
Is the scope plausible? Read description and cpv_codes; do not rely on the search score alone.
Is the deadline workable? submission_date and your bid preparation time.
Is the size in range? estimated_value_eur; treat missing values as unknown, not zero.
Is the geography allowed? contracting_country_iso and your delivery constraints.
Is the language allowed? language; for notice-level data, submission.submission_language.
Is it already tracked? Compare with GET /pipeline.
Does the evaluator agree? match, recommended, and, for runs, evaluation.fit and finalScore.score.

match and recommended are model judgements, not facts. The detail fields and the documents are authoritative.

5. Broaden or narrow

  • Too few results: remove a keyword, widen contractingCountry, increase submissionDeadlineAtLeastDays, or use expandKeywords.
  • Too many results: add CPV codes, add excludeKeywords, or switch recommendedFilter to only.
  • Wrong results: check CPV codes and country filters before adding more keywords; keyword-only search can overfit the wording.

6. Find similar opportunities

Once you have a strong tender, use look-alike discovery to find semantically similar opportunities in other notices.

Next steps