API key registration
1inch requires creating an account and generating an API key before making any requests. swapapi requires nothing — start with a curl command in 30 seconds.
Last updated:
swapapi is a drop-in alternative to 1inch's Swap API. No API key, no SDK, no account. One GET request returns the same calldata you're used to — across 46 EVM chains instead of ~10.
Motivation
1inch requires creating an account and generating an API key before making any requests. swapapi requires nothing — start with a curl command in 30 seconds.
1inch rate limits vary by plan. The free tier is restrictive and paid plans can be expensive for high-volume applications. swapapi has generous rate limits with no paid tiers.
1inch changed their swap endpoint from GET to POST, breaking existing integrations. swapapi uses a simple GET request and maintains backward compatibility.
No SDK installation, no account creation, no environment variables. swapapi works with raw HTTP from any language, any platform, any autonomous agent.
Parameter mapping
Most parameters map directly. The main differences are naming and slippage format.
| 1inch Parameter | swapapi Parameter | Notes |
|---|---|---|
| src | tokenIn | Same format (0x address) |
| dst | tokenOut | Same format (0x address) |
| amount | amount | Same (raw units, no decimals) |
| from | sender | Same (wallet address) |
| slippage | maxSlippage | 1inch: 1-50 (percentage). swapapi: 0-1 (decimal). 1inch slippage=1 is swapapi maxSlippage=0.01 |
| Authorization header | (not needed) | swapapi requires no authentication |
Code comparison
$ curl -X GET \ "https://api.1inch.dev/swap/v6.0/1/swap" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "src": "0xEeee...EEeE", "dst": "0xA0b8...eB48", "amount": "1000000000000000000", "from": "0xd8dA...6045", "slippage": 1 }'
$ curl "https://api.swapapi.dev/v1/swap/1?\ tokenIn=0xEeee...EEeE&\ tokenOut=0xA0b8...eB48&\ amount=1000000000000000000&\ sender=0xd8dA...6045" # No API key # No headers # No request body # Just a GET request
Response format
swapapi wraps every response in an envelope with a success flag and timestamp. The transaction data is structurally similar.
{ "tx": { "from": "0xd8dA...6045", "to": "0x...router", "data": "0x...calldata", "value": "1000000000000000000", "gas": 250000 // number — unsafe for large values } }
{ "success": true, // always check this first "data": { "status": "Successful", // "Successful" | "Partial" | "NoRoute" "swapPrice": 2847.53, // exchange rate "priceImpact": 0.0012, // 0.12% as decimal "amountIn": "1000000000000000000", // string — BigInt safe "expectedAmountOut": "2847530000", // string — BigInt safe "tx": { "from": "0xd8dA...6045", "to": "0x...router", "data": "0x...calldata", "value": "1000000000000000000", "gas": "250000" // string — BigInt safe }, "rpcUrls": ["https://..."] // bonus: RPC endpoints for the chain }, "timestamp": "2026-03-20T..." // ISO 8601 }
Key differences: swapapi adds a success envelope, a status field (Successful/Partial/NoRoute), price impact data, and RPC URLs. All BigInt values are returned as strings to prevent JavaScript precision loss.
Honest tradeoffs
Checklist
Follow these steps to complete your migration. Most integrations can be migrated in under 15 minutes.
api.1inch.dev/swap/v6.0/{chainId} to api.swapapi.dev/v1/swap/{chainId}src to tokenIndst to tokenOutfrom to senderslippage=1 becomes maxSlippage=0.01)response.data.tx instead of response.txNeed more details? Read the full integration tutorial. See how swapapi compares to other APIs in the comparison table. Check all 46 supported chains. Learn about slippage and price impact.