Algorand REST APIs
HTTP APIs for interacting with the Algorand blockchain
What are Algorand REST APIs?
Algorand REST APIs provide HTTP endpoints for interacting with the Algorand blockchain. These APIs allow developers to query blockchain data, submit transactions, and interact with smart contracts using standard HTTP requests from any programming language or platform.
The REST APIs are the foundation for all Algorand SDKs and provide direct access to blockchain functionality without requiring language-specific libraries.
Core API Services
Algod API
Core blockchain operations including transaction submission, account queries, and network status.
Indexer API
Advanced querying and searching of historical blockchain data with filtering and pagination.
KMD API
Key Management Daemon for secure wallet operations and transaction signing.
Conduit API
Real-time blockchain data streaming and custom data pipeline configuration.
Algod API Endpoints
Account Operations
Transaction Operations
Block Operations
Indexer API Endpoints
Search Operations
Filtering and Pagination
The Indexer API supports advanced filtering with query parameters like asset-id, application-id, min-amount, max-amount, before-time, after-time, and many more. Results are paginated using next-token for efficient data retrieval.
Authentication and Rate Limiting
API Tokens
Most Algorand REST API endpoints require authentication using API tokens. Include the token in the request header:
X-Algo-API-Token: your-api-token-here
Rate Limits
API endpoints have rate limits to ensure fair usage and network stability. Check response headers for rate limit information and implement appropriate retry logic in your applications.
Example API Calls
Get Account Information
curl -X GET \ "https://testnet-api.algonode.cloud/v2/accounts/ACCOUNTADDRESS" \ -H "accept: application/json"
Submit Transaction
curl -X POST \ "https://testnet-api.algonode.cloud/v2/transactions" \ -H "Content-Type: application/x-binary" \ --data-binary @signed_transaction.txn
Search Transactions
curl -X GET \ "https://testnet-idx.algonode.cloud/v2/transactions?address=ACCOUNTADDRESS&limit=10" \ -H "accept: application/json"
Network Endpoints
MainNet
TestNet
BetaNet
Best Practices
Error Handling
Always implement proper error handling for API calls. Check HTTP status codes and parse error messages from response bodies to handle failures gracefully.
Caching
Implement appropriate caching strategies for frequently accessed data to reduce API calls and improve application performance.
Pagination
Use pagination parameters effectively when dealing with large datasets. The Indexer API provides next-token for efficient pagination through results.
