Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ted-cli

License Python Built by

CLI for EU public tenders via the TED notice search API.

pip install -e .
ted search -c MLT -c PRT -c ESP --cpv it --open
ted show 538530-2026

No API key, no account. TED's public search API is open.

Install

cd ted-cli
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

ted search -c MLT --since 30

Commands

search

Filters compose into a TED expert-search query.

ted search -c MLT -c PRT --cpv it --open           # live IT tenders in Malta and Portugal
ted search -c ESP -t "wordpress" --since 90        # anything mentioning WordPress, last 90 days
ted search -c PRT --nature services --min-value 50000
ted search -c MLT --cpv it --dry-run               # print the query instead of running it
Flag Meaning
-c, --country Buyer country, ISO 3-letter, repeatable (MLT, PRT, ESP)
--cpv CPV code or preset, repeatable
-t, --text Full-text match across the notice
--title Match the title only
--since / --until YYYY-MM-DD or days back (--since 30)
--open Only calls for tender still accepting bids
--deadline-after YYYY-MM-DD or days ahead (--deadline-after 14)
--nature services, supplies or works
--type Notice type, e.g. cn-standard
--min-value Minimum estimated lot value
--and Extra raw expert-query clause, ANDed in
--format table, json, csv, urls

CPV presets, so you don't have to memorise codes: it (72000000), software (48000000), programming (72200000), internet (72400000), consulting (79400000), marketing (79340000). A code matches its whole subtree, so --cpv it also picks up 72514000, 72250000 and the rest of the 72 division.

watch

Prints only what it hasn't seen before, so it can run on a schedule without repeating itself. Seen publication numbers live in $XDG_STATE_HOME/ted-cli/seen.json (default ~/.local/state/ted-cli/seen.json).

ted watch -c MLT -c PRT -c ESP --cpv it --cpv software --open
ted watch --name malta-only -c MLT --open --format json   # separate state per --name
ted watch --reset -c MLT --open                           # forget history and re-seed

First run reports everything matching and records it. Add --no-save to see what's new without consuming it.

query

The escape hatch, for anything the flags don't cover. Same syntax as TED Expert Search.

ted query '(buyer-country IN (MLT)) AND (FT ~ "cloud") SORT BY publication-date DESC'
ted query 'classification-cpv IN (72000000)' --check    # validate syntax, don't run

show

ted show 538530-2026
ted show 538530-2026 --format json

fields

Lists the searchable field names straight from the published API spec, for composing raw queries.

ted fields deadline
ted fields | wc -l

Notes

Dates come back as 2026-08-04+02:00 and are trimmed to the date. Titles and buyer names arrive as a dict of 24 languages; English is preferred, then Portuguese, Spanish, Maltese.

TED carries notices above the EU publication thresholds, roughly €143k+ for central government services. Below-threshold contracts stay on national portals and never reach it.

API limits: 250 notices per page, 10,000 fields per page (fields x limit), and 15,000 notices retrievable for one query through pagination.

Development

pip install -e ".[dev]"
pytest

About

CLI for EU public tenders via the TED (Tenders Electronic Daily) search API. No API key.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages