DEV Community

Gio Rich
Gio Rich

Posted on

Finding EU organic coffee importers who can legally buy your green beans, with Python and the TRACES directory

I built this actor; it's a paid tool on Apify with a free trial credit.

If you sell organic green coffee, cocoa or spices into Europe, the buyer has to be certified too. Since Regulation (EU) 2018/848, every importer, processor and trader of organic products in the EU holds a certificate, and the European Commission publishes all of them in the TRACES NT directory: about one million certificates, 513,812 of them valid on 10 November 2026.

That makes it the best free lead list an organic exporter has. It also makes it awkward to use: the directory search is built for checking one certificate, mixes in hundreds of thousands of individual farmers, and does not tell you at a glance whether an importer is certified for the kind of product you ship.

I built EU Organic Certified Suppliers & Importers Scraper to return those certificates as JSON rows, companies only. This post takes the 20 newest valid certificates for "coffee" + "import" (real run, 10 November 2026) and turns them into a buyer list an exporter can actually use.

Limits first: there are no e-mails, phone numbers, contact names, prices or volumes in the directory, so there are none in the output. You get the company, its address, what it is certified to do, and its certificate.

Step 1: pull certified coffee importers

from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("rel8ble/eu-organic-operators-scraper").call(run_input={
    "productName": "coffee",
    "activities": ["import"],
    "statuses": ["ISSUED"],      # valid certificates only
    "sort": "newest_issued",
    "maxResults": 20,
})
certs = client.dataset(run["defaultDatasetId"]).list_items().items
print(len(certs))  # 20
Enter fullscreen mode Exit fullscreen mode

Each row is one certificate held by a company. A trimmed real one:

{
  "operatorName": "Trabocca BV",
  "legalForm": "BV",
  "operatorIdentifier": "528-0006360",
  "city": "Amsterdam",
  "countryCode": "NL",
  "activities": ["Distribution/Placing on the market", "Import"],
  "productCategories": [{"code": "(a)", "label": "Unprocessed plants and plant products, ..."}, {"code": "(d)", "label": "Processed agricultural products, ..."}],
  "status": "Issued",
  "issuedOn": "2026-11-05",
  "expiresOn": "2028-01-01",
  "controlBodyCode": "NL-BIO-01",
  "controlBodyName": "Stichting Skal Biocontrole",
  "certificatePdfUrl": "https://webgate.ec.europa.eu/tracesnt/directory/publication/organic-operator/NL-BIO-01.528-0006360.2026.002.pdf"
}
Enter fullscreen mode Exit fullscreen mode

The 20 rows came from six countries: France 8, Germany 4, Netherlands 3, Spain 2, Italy 2, Czechia 1. Individual farmers and sole traders are skipped by the actor and never charged, which matters a lot on producer searches and very little on importers.

Step 2: keep importers certified for raw product

This is the filter people miss. An EU organic certificate lists product categories, and the two that matter for an origin exporter are:

  • (a) unprocessed plants and plant products (green coffee, raw cocoa beans, whole spices)
  • (d) processed agricultural products for food (roasted coffee, chocolate, instant coffee)

An importer whose certificate covers only (d) is certified for processed goods. If you ship green beans, you want (a) on the certificate, so check it before you spend a sample bag.

raw_ok = [
    c for c in certs
    if "Import" in c["activities"]
    and any(cat["code"] == "(a)" for cat in c["productCategories"])
]
print(len(raw_ok), "of", len(certs))
for c in certs:
    if c not in raw_ok:
        print("processed only:", c["operatorName"], c["countryCode"])
Enter fullscreen mode Exit fullscreen mode

On the real sample, 15 of the 20 pass. The five that do not are (d)-only or (d)+(g): CAFES BATALLA 2000 (Lleida), PADOVANA MACINAZIONE (Campodarsego), Econic HUB (Beroun), Trusty & Trady GmbH (Bochum) and SA GUEDANT (Poigny). They may still be good customers for roasted or packed coffee, just not for a container of green beans.

Step 3: split roasters from traders

activities tells you what the company does with the product. "Preparation" means processing or packing (roasting, blending, grinding); a certificate with Import but no Preparation is usually a pure trader or distributor.

roasters = [c for c in raw_ok if "Preparation" in c["activities"]]
traders  = [c for c in raw_ok if "Preparation" not in c["activities"]]
print(len(roasters), "import + process;", len(traders), "import and sell on")
Enter fullscreen mode Exit fullscreen mode

In the sample, 12 of the 15 also process, among them Naturata AG, Harvest Republic GmbH, Simon Lévelt Koffie- en Theehandel and SAS Thés de la Pagode. The three that only import and distribute are Trabocca BV (a green coffee importer in Amsterdam), BJORG ET COMPAGNIE and the Valladolid cooperative COME SANO COME JUSTO. Roasters are your direct buyers; traders are the people who will want a price list and a container schedule.

Step 4: drop certificates that lapse before your shipment

A certificate that expires before your coffee lands is a customs problem waiting to happen. You can filter in the run ("expiresAfter": "2027-06-30") or after it:

ship_by = "2027-06-30"
valid_at_arrival = [c for c in raw_ok if c["expiresOn"] >= ship_by]
for c in raw_ok:
    if c["expiresOn"] < ship_by:
        print("renewal due:", c["operatorName"], c["expiresOn"], c["controlBodyCode"])
Enter fullscreen mode Exit fullscreen mode

Three of the 15 expire before mid-2027: SA ROBERTET (2027-03-31) and two Dutch firms on 2027-01-01. All three Dutch certificates in the sample come from Skal (NL-BIO-01) and all three end on a 1 January, so a short date there is more likely a renewal cycle than a warning sign. Treat a near expiry as "ask for the renewed certificate before the contract", not as "skip".

Step 5: watch a buyer's certificate after you sign

Certificates get suspended and withdrawn, and the buyer will not always tell you. Once you have a customer, look them up by operator number on a schedule:

run = client.actor("rel8ble/eu-organic-operators-scraper").call(run_input={
    "operatorIdentifier": "528-0006360",
    "statuses": ["ISSUED", "SUSPENDED", "WITHDRAWN", "EXPIRED"],
    "maxResults": 0,
})
for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(c["certificateReference"], c["status"], c["expiresOn"])
Enter fullscreen mode Exit fullscreen mode

Put several operator numbers in one weekly Apify schedule and alert on anything that is not Issued. Each row links the public certificate PDF and the digitally signed PDF on TRACES, so you can attach the exact document to your file.

Scaling it up

  • Every valid organic importer certificate held by a company in the EU is a few thousand rows. The directory reports 7,923 valid importer certificates in total, including individuals the actor skips.
  • One search returns at most 10,000 certificates. For bigger pulls, split by operatorCountries (each country is its own search) or by productCategories.
  • productName works for any product on the certificates: "cocoa" finds 2,154 certificates and "olive oil" 22,187 across all operators.
  • The 20-row demo took 5.7 s in an Apify cloud run. The actor sends one request at a time, at most 40 a minute.

Price and caveats

$1.00 per 1,000 rows, no start fee. Skipped natural persons, empty searches, input errors and failed requests are not charged. The 20-row list above costs $0.02.

The company screen is name-based: an operator written without its legal form (GmbH, SAS, B.V. ...) is treated as a person and skipped, so a few real companies will be missing. Product lines (CN codes) are only filled when the control body listed them, which on this sample was none. The data is © European Union, TRACES NT, reused under CC BY 4.0, and the actor is not affiliated with or endorsed by the European Commission. Always read the certificate PDF itself before you contract.

Actor page: https://apify.com/rel8ble/eu-organic-operators-scraper

Need a custom scraper or a ready dataset? Hire me on Fiverr: https://www.fiverr.com/rel8ble

Top comments (1)

Collapse
 
hiredov profile image
Dov at HireDov •

This is a smart way to turn a registry into a shortlist. One extra step I'd add is deduping records by operator identifier while keeping the certificate link and product-category code in each buyer record—similar company names can otherwise muddy the list. Before a sample goes out, match the certificate scope to the product's actual state (green vs. roasted) and note when it needs rechecking; that gives the team a practical qualification trail.