Contratos que vencen
search_expiring_contractsPublic contracts that MAY END SOON (contratos que vencen): awarded competitive contracts whose estimated end falls within horizon_months (3, 6, 9 or 12; default 12), soonest end first: who is likely to tender next, and when. The end is an ESTIMATE from published data: the date the contract was formalised plus the duration its notice states (estimated_end, a month YYYY-MM); not a stated date and not a forecast that the contract will be re-tendered or by whom. A notice that publishes no duration cannot be estimated and is not listed, so quote coverage (awarded_contracts of the scope, with_estimable_end of them, share) with every total. When extended is true a published modification extends the term and original_end is the end without it. Filters: sector (slug, see list_sectors), comunidad or provincia (place of performance; not both), cpv (one code: the main CPV is it or under it), min_amount / max_amount (tender budget excluding IVA), q (words of the contract title, when Licto's title search is open) and organization_id (one organismo's contracts, as on its page). company_id instead lists the contracts one company holds, as on its page; only horizon_months, cursor and limit combine with it, and a plan without the full list (Profesional and above) gets the 3 nearest with no paging. Returns total (contracts ending inside the horizon, all pages), by_month (per calendar month of the next 12 months, ALWAYS 12 whatever horizon_months, so it can sum to more than total) and items: id, title, estimated_end, budget_eur, sector, cpv, place, organismo (id, name, comunidad, url), the licto.es url and, where Licto publishes them, award_amount_eur (the award, excluding IVA; lot_count is there only for a contract with several lots, and award_lots_counted only when the amount adds up just some of them; neither means one award for the whole contract) and received_bids (the highest count of one lot when received_bids_is_highest_lot). With include_holders each item has holders: how many, and the name and url of the company when there is exactly one (a person's name is masked); lookups are limited per account (30 pages a minute, 120 an hour) and a page over the budget comes without them (holders_note). Pages of up to 50: while the result has a next_cursor, pass it as cursor (same other arguments). Facts only: Licto draws no conclusion from them.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_expiring_contracts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Words of the contract title, 3 to 80 characters and at most 8 words: every word must be present; accents, capitals and plurals are ignored. The list keeps its order (estimated end), never relevance, and `coverage` is absent. Available only while Licto's title search is open to the caller. | |
| cpv | No | One CPV code of 2-8 digits: the contract's main CPV is that code or one under it (a 2-digit division, a longer prefix or a full code). | |
| limit | No | Page size | |
| cursor | No | Paging: the `next_cursor` of the previous page. Keep every other argument the same. | |
| sector | No | Licto sector slug from list_sectors, e.g. 'tecnologia' or 'construccion'; 'otros' is the catch-all sector. | |
| comunidad | No | Comunidad autónoma of the place of performance by name, e.g. 'Andalucía' or 'Madrid'. For a province use `provincia`. | |
| provincia | No | Provincia of the place of performance by name, e.g. 'Sevilla' or 'Bizkaia'; accents and case are ignored. Give one of `comunidad` and `provincia`, not both. The islands of Canarias and Illes Balears are filtered by `comunidad`. | |
| company_id | No | Instead of the national list, the contracts this company holds (id from search_companies), as the company page's «Contratos con fin estimado» block. Only `horizon_months`, `cursor` and `limit` combine with it. Without a plan that includes the full list (Profesional and above) only the 3 nearest are returned. | |
| max_amount | No | Maximum tender budget in EUR, excluding IVA | |
| min_amount | No | Minimum tender budget in EUR, excluding IVA | |
| horizon_months | No | Window of the list: contracts estimated to end within 3, 6, 9 or 12 months. | |
| include_holders | No | true = say who holds each contract of the page (national list and organismo only). Costs one unit of the account's holders budget per page; false skips it. | |
| organization_id | No | Only the contracts of this organismo (id from search_organizations), the same list as the organismo page's «Contratos con fin estimado», with the filters above. |