SQL API and Developer API

The video provides an overview of Dune's API functionality, highlighting that every query on Dune can be used as an API endpoint. Here are the key points:

  1. Query as API Endpoint: Every query on Dune can be accessed via its query ID, allowing users to retrieve results in JSON or CSV format. However, private queries are only accessible by their creators.
  2. Billing and Usage: API usage costs are based on query execution and data points retrieved. The cost scales with the plan, offering more data points per credit as users upgrade. Users can monitor their usage and manage API keys through Dune's settings.
  3. API Operations: The API allows for CRUD (Create, Read, Update, Delete) operations on queries, including managing query settings and refreshing materialized views. Most users will utilize execution and results APIs to run queries and retrieve data.
  4. SDKs and Parameters: Dune provides Python and TypeScript SDKs to simplify API interaction. Users can pass query parameters using these SDKs, making it easier to integrate with Dune's API.
  5. Preset Endpoints: Dune offers preset API endpoints for common data retrieval tasks, such as contract deployments and market forecasts, reducing the need for custom query management.
  6. Uploading Data: Users can upload data directly to Dune via the API, bypassing the 200MB limit of manual uploads. This feature is useful for continuously inserting data programmatically.
  7. Developer API: Dune also provides a developer API for retrieving token balances and transactions in real-time, with minimal delay, which is separate from the main query API.

The video emphasizes the flexibility and power of Dune's API, allowing users to seamlessly integrate and automate data retrieval and management within their applications.

Transcript