How to build an X bot that scrapes contract addresses and checks them for rugs
2 min read
TrnchLabs
Build a bot that scrapes contract addresses (CAs) from X or Telegram and checks each one for rugs, honeypots and scams before anyone buys. Free trnch API, no key, one line of code.
Bots that scrape contract addresses (CAs) from X and Telegram are everywhere: they spot a new token the second someone posts it. The weak point is what happens next. A CA posted on X is often a rug, a honeypot or a copycat, and a bot that relays it without checking pushes its followers straight into it.
trnch gives these bots a free check. One call returns trnch scan's verdict on any Robinhood Chain or Elysium token, with a one-line summary ready to post and a link to the token page. No key, no account.
How an X bot scrapes contract addresses
A CA scraper reads new posts (from the X API, a list of accounts or a Telegram group), extracts every string that looks like an EVM address, 0x followed by 40 hexadecimal characters, and keeps the new ones. That part is simple. Deciding which CA is worth posting is the hard part, and that is where the check comes in.
1. Extract the CA
Match 0x followed by 40 hexadecimal characters in each new post, lowercase it and drop duplicates.
2. Call the trnch check
GET https://trnch.fun/api/bot/v1/check?token=0x... returns the verdict. For many CAs at once, POST https://trnch.fun/api/bot/v1/check/batch with up to 20 addresses.
3. Post the verdict
Use the summary field as is, and link the tokenUrl field. Skip or label any token marked rugged, dumped or flagged.
curl "https://trnch.fun/api/bot/v1/check?token=0x..."
{
"verified": false,
"summary": "No red flag found by trnch. Not a guarantee.",
"rugged": false, "dumped": false,
"tokenUrl": "https://trnch.fun/token/0x..."
}What the check returns
- rugged and dumped: the liquidity was pulled, or a group of wallets dumped the token on its launch curve.
- status and category: whether trnch scan keeps the token out, and why (cannot sell, heavy sell tax, copycat, scam contract).
- creator: the deployer's launch history, from first launch to serial launcher.
- verified: true for tokens verified by trnch and official assets.
- summary: one line to post as is. tokenUrl and cardUrl: the token page and its share image.
Limits and license
The check is free with no key: 120 calls per minute per IP on Robinhood Chain, and batches of up to 20 tokens. Check results are free to display and relay with a link to the token on trnch. A check is a signal, never a guarantee: a clean result means trnch found no red flag, not that a token cannot fall.
FAQ
Do I need an API key to check a CA?
No. The check is free and keyless. A key is only needed to trade through the Bot API.
Which chains are covered?
Robinhood Chain and Elysium.
Can my bot post the trnch verdict on X or Telegram?
Yes. Check results are free to display and relay with a link to the token page on trnch (the tokenUrl field).
Can AI agents use the same check?
Yes, through the free MCP tool trnch_check, A2A, or pay-per-call x402.