Kosmobids Public API

Matching, scores, and fit

How search criteria become candidates, what the relevance fields mean, and how saved-search runs classify fit.

Matching combines semantic phrase search with CPV-code filtering. Candidates are deduplicated and reranked, then evaluated against the company's profile. The Public API exposes the result as IDs and relevance signals; hydrate the IDs with the tender endpoints to get the full opportunity.

Search criteria

Criteria are the structured filters applied before or during matching. All fields are optional.

Field Type Meaning
includeKeywords string[] Keywords or phrases that should appear in the opportunity.
excludeKeywords string[] Keywords that disqualify a candidate.
cpvCodes { code, includeDescendants? }[] CPV codes. code must be eight characters.
contractingCountry string[] ISO country codes of the contracting authority.
submissionLanguages string[] Languages of the submission.
minContractValueEur / maxContractValueEur number Contract value bounds in EUR.
submissionDeadlineAfter / Before date Absolute submission deadline window.
submissionDeadlineAtLeastDays number Relative deadline window in days. Cannot be combined with the absolute deadline fields.
publishedAfter / Before date Absolute publication window.
publishedDaysAgo number Relative publication window. Cannot be combined with the absolute publication fields.
createdAfter / Before date When the record entered the system.
skipUnknownValue boolean Exclude tenders whose contract value is not disclosed.

Only include a contract-value filter when the request explicitly asks for one. A search for a sector and a country should not silently add a value constraint.

Search options

Options change how the search runs, not which opportunities exist.

Option Type Meaning
type mixed | streamlined Search strategy.
reranker jina | cohere Reranking provider.
searchPhrase { phrase, id }[] Explicit semantic phrases. Each phrase must be at least five characters.
recommendedFilter all | only | exclude Filter by the recommended flag.
sort / sortDir deadline | published | value | country and asc | desc Result ordering.
evaluationPrompt string Prompt override for LLM evaluation.
includeCompanyDescription boolean Include the company description in evaluation prompts.
expandKeywords boolean Expand includeKeywords with synonyms before searching.
overrideSavedSearch boolean When a savedSearchId is supplied, merge the request criteria and options over the saved search.

Some product-level options exist in the schema for compatibility with the Kosmobids application. They are not required for API integrations.

Ad-hoc search results

POST /search returns IDs and relevance fields:

{
  "data": {
    "results": [
      {
        "id": "0f8fad5b-d9cb-469f-a165-70867728950e",
        "score": 0.82,
        "rerankingScore": 0.91,
        "recommended": true,
        "match": true
      }
    ]
  },
  "error": null
}
Field Meaning
id A tender (lot) ID. Hydrate it with GET /tenders/:tenderId.
score Semantic similarity score. Optional.
rerankingScore Score after reranking. Optional.
recommended Whether the result passed the recommendation policy. Optional.
match Whether the result was judged a match. Optional.

Scores are comparative, not a probability. Do not compare scores across different searches or different rerankers; use them to order results within one response.

Saved-search run results

A matching run produces richer evaluation records than an ad-hoc search. Each item includes the standard match-score fields and, when the evaluator produced them, evaluation and finalScore:

{
  "id": "match-score-id",
  "tender_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
  "company_id": "company-uuid",
  "evaluation": {
    "fit": "match",
    "reasoning": "The company delivers the required cloud migration services.",
    "origin": ["semantic-phrase", "cpv"]
  },
  "finalScore": {
    "score": 4,
    "reasoning": "Strong overlap with only minor certification gaps.",
    "reasoning_short": "Strong fit with minor gaps.",
    "warnings": ["ISO 27001 is required but not listed in the company profile."]
  },
  "readable_content": {
    "readable_title": "Cloud migration and managed services",
    "readable_description": "A multi-year migration and operations contract.",
    "eligibility_criteria": ["ISO 27001 certification", "EU presence"]
  }
}

Fit labels

fit Meaning
match Direct alignment between the company's offering and the tender requirements.
industry_match Same industry, but the specific service is not confirmed.
not_match No meaningful connection.

Final score

finalScore.score is an integer from 1 to 5:

Score Meaning
5 Ideal match.
4 Strong alignment with minor gaps.
3 Moderate alignment with significant gaps.
2 Weak overlap.
1 No relation.

warnings contains red flags that the evaluator found. Treat them as review prompts, not as definitive disqualifiers.

Preview versus published matches

A saved-search run keeps its matches as previews by default. Set publishMatches: true on the run trigger to publish qualifying matches to the company pipeline. Publishing is governed by the product's quality policy, so a run can contain more matches than are published.

Evaluating in your own system

The evaluation fields are model output. They are useful for ranking and triage, but they are not a substitute for reading the tender documents. For decisions with legal or financial consequences, use document analysis and read the cited pages.