Pay-per-call data APIs for AI agents, one Python client: IBAN, VAT/tax ID, ISIN, GTIN validation and 29 more utilities; SEO keyword data, SERP, backlinks, Google Trends; social media data (X/Twitter, Reddit, TikTok, Bluesky); crypto funding rates, open interest. x402 USDC on Base, no API key.
pip install duo-data-utilities Copy PIP instructions
pip install duo-data-utilities Python 3.10 or later. Only need one service? The same clients ship as standalone packages: x402-seo-keyword-data, x402-crypto-derivatives-data and x402-social-media-data.
import os from eth_account import Account from duo_data_utilities import DuoClient client = DuoClient(Account.from_key(os.environ["DUO_PAYER_KEY"])) # your wallet, never a literal key print(client.iban.validate(iban="NL91 ABNA 0417 1643 00")["valid"]) # $0.05 DuoClient shares one wallet across the four services (client.derivs, client.keywords, client.social). Method names match the TypeScript client in snake_case.
rates = client.derivs.funding_rates(coin="BTC") # $0.003 book = client.derivs.orderbook(coin="BTC", size_usd=250_000) # $0.003 arb = client.derivs.funding_arbitrage(min_apr=20) # $0.005, all coins Bybit, Hyperliquid, dYdX, Gate, Kraken, Bitfinex, Deribit and OKX. When fewer venues answer than the route needs, the answer is a 503 and nothing is charged. Data only, not investment advice.
volume = client.keywords.search_volume(keywords=["phone", "watch"], country="us") # $0.04 (GET) ideas = client.keywords.keyword_ideas(keyword="seo api", limit=50) # $0.04 (POST, JSON body) trend = client.keywords.trend(keyword="seo tools", timeframe="past_12_months") # $0.045 gap = client.keywords.keyword_gap(domain="example.com", competitor="example.org") # $0.048 Each route has its own HTTP method (most are POST with a JSON body); the client picks it. Parameters keep their API names (locationCode, includeMonthly). SEO_KEYWORD_ROUTES lists all 44 routes with HTTP method, price and MCP tool. A bad input is a free 400; an upstream failure is a 503 with "nothing was charged".
posts = client.social.bluesky_search(q="x402", limit=10) # $0.01 tweets = client.social.x_search(q="x402 payments") # $0.02 everywhere = client.social.social_search(q="x402") # $0.025 Every route is a GET. SOCIAL_ROUTES lists all 26. Answers are third parties' public data: read the service's terms and privacy notice, and do not use the data to profile, target or train AI on individuals.
Before anything is signed, each client refuses a payment requirement on another network than Base, in another asset than Base USDC, to another payee than 0xCD673f7e1daD254347AEab6be0DEFe8b9C6b3A39 (pay_to=), or above its cap. A refusal signs nothing and raises PriceGuardError. The client never retries a paid call on its own.
Errors raise DuoApiError with code, param, expected, status and request_id. call_with_receipt(path, params) returns the answer with the settlement receipt.
The full documentation, the route tables and the MCP servers are in the repository README: https://github.com/hiesem/duo-data-utilities
Listed on PayAPI Market (settlement-verified): Duo Data Utilities, SEO and Keyword Data API, Crypto Derivatives Data API, Social Media Data API.
The client sends a User-Agent naming the SDK and version (duo-data-utilities-py/ (+https://github.com/hiesem/duo-data-utilities)); the services store only a coarse client class, see https://api.duoleads.com/privacy. Pass user_agent= to change it.
iban isin vat tax-id gtin barcode mod-97 x402 usdc base ai-agents agent-tools pay-per-call no-api-key mcp seo seo-api keyword-research search-volume cpc keyword-difficulty google-trends serp backlinks social-media-data social-listening twitter-api x-api reddit tiktok bluesky hacker-news crypto-derivatives perp funding-rate funding-arbitrage open-interest futures-basis implied-volatility liquidations order-book hyperliquid trading-bot
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




