跳到正文
DEV Community· SpellzCode·· 7 天前AI 評分60

tools.funwords.eu 提供歐洲數據搜尋的 Exa 替代方案,沿用 exa-py 和 exa-js 只需更改一行

An Exa alternative for European data: keep exa-py and exa-js, change one line

AI 導讀

tools.funwords.eu 提供可沿用 Exa 的 exa-py 和 exa-js SDK 的搜尋服務,開發者更換 base URL 即可使用兼容 Exa 請求與回應格式的 /v1 端點。

正文

SpellzCode

If your agent already talks to Exa, you do not need a new client to try our search. Exa's own SDKs take a base URL, and our /v1 endpoints answer in Exa's request and response shape: search, getContents, findSimilar, answer (with streaming and structured outputSchema answers).

Python

from exa_py import Exa

exa = Exa(api_key="YOUR_KEY", base_url="https://tools.funwords.eu/v1")

# EU law, answered from our article-by-article index
r = exa.search("NIS2 incident reporting deadline", category="law", num_results=5)

# Companies, answered from official business registers
r = exa.search("Spotify AB", category="company", num_results=5)

JavaScript

import Exa from "exa-js";

const exa = new Exa(process.env.API_KEY, "https://tools.funwords.eu/v1");
const res = await exa.search("KONE Oyj", { category: "company", numResults: 5 });

The SDKs send your key in the x-api-key header, which we accept as they send it.

Where each request goes

What you send Where the answer comes from
category: "law", or includeDomains: ["eur-lex.europa.eu"] Our EU law index: 47 acts (GDPR, AI Act, DSA, DMA, NIS2, DORA, MiCA, VAT, PSD2, AML…) split into articles, hosted in the EU
category: "company" with a company name Official registers of France, Sweden, Norway, Finland, Czechia and Estonia, plus GLEIF; results carry register IDs and LEIs
category: "research paper" OpenAlex and Crossref (or arXiv)
category: "github" GitHub's own search
getContents The live page, fetched when you ask; PDFs included
answer Cited answers; EU-law questions are answered from the law index

Why switch, and why not

We measured instead of guessing. On 102 EU compliance questions written before either search ran, our law index put the right article first 76 times, Exa's web search 34. For companies both found 10 of 10, but only ours returned the register ID. On research papers Exa was slightly ahead (17 vs 16 of 20). Questions, scoring and scripts are public on our benchmarks page.

Where Exa is clearly better: the open web. Its own index is far larger than anything we run, and we do not search people. If most of your queries are general web research, stay with Exa for those and send the European records questions to us; it is one base URL per client.

Things Exa does not have

The same key also opens endpoints outside the SDK:

# Sanctions screening against the EU, UN, UK and US (OFAC) lists
curl -H "Authorization: Bearer $API_KEY" "https://tools.funwords.eu/sanctions/check?name=Vladimir%20Putin&lists=eu,un,uk,ofac"

# Know-your-business check for a European company in one call
curl -H "Authorization: Bearer $API_KEY" "https://tools.funwords.eu/pack/kyb-eu?q=Spotify%20AB"

There is also a VAT number check (VIES), e-invoice validation and document text extraction, all on the same key, and every endpoint can also be paid per call over x402 by an agent with a wallet.

Price

A free key gives 100 calls a month with no card. After that it is $0.005 to $0.01 per successful call, or $9 a month for 1,500 calls; failed calls are never charged.

If you have a European search case we get wrong, tell us in the comments. We add hard cases to the next benchmark run.

來源:DEV Community · dev.to