opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.

Running Queries via Open Dental API

API & Integrations3 min read4/19/2026

If you need to pull specific data from your practice database that isn't available in standard reports, the open dental API query endpoint is the tool for the job. This feature allows you to send custom SQL commands to your database and receive the results in a structured format, enabling you to build custom dashboards, automated reporting tools, or specialized data exports without manually running reports in the software.

Prerequisites

Before you can run queries, you must ensure your environment is configured correctly:

  1. API Access Tier: You must have an active API subscription that includes the "Queries" permission. This is typically part of the $15/month tier (or higher).
  2. Developer Portal Access: You need a developer account. If you do not have one, contact vendor.relations@opendental.com to request access.
  3. eConnector: The office must have the eConnector service installed and running. This service acts as the bridge between the Open Dental headquarters API server and your local database.
  4. API Setup: In Open Dental, go to Setup > Advanced Setup > API. Ensure the "Enabled" checkbox is checked and that you have added the Customer API Key generated from your developer portal.

Implementation

The query endpoint is strictly read-only. It will not allow commands that modify, delete, or insert data into your database.

To run a query, you will send a PUT request to the /queries/ShortQuery endpoint. You must include your Developer Key and Customer Key in the Authorization header.

Example using JavaScript (Node.js)

const axios = require('axios');

const developerKey = 'YOUR_DEVELOPER_KEY';
const customerKey = 'YOUR_CUSTOMER_KEY';
const baseUrl = 'https://api.opendental.com/api/v1';

async function runCustomQuery() {
  const sql = "SELECT PatNum, LName, FName FROM patient LIMIT 10;";
  
  try {
    const response = await axios.put(`${baseUrl}/queries/ShortQuery`, 
      { SqlCommand: sql },
      {
        headers: {
          'Authorization': `ODFHIR ${developerKey}/${customerKey}`,
          'Content-Type': 'application/json'
        }
      }
    );
    console.log(response.data);
  } catch (error) {
    console.error('Error executing query:', error.response ? error.response.data : error.message);
  }
}

runCustomQuery();

Common Errors

Limitations

Don't want to build your own dashboard? DentalCanvas already connects to your Open Dental data and shows you everything in a visual interface.


This article is provided by opendentalsupport.com, an independent community resource. We are not affiliated with Open Dental Software, Inc.

Skip the API. Get a Dashboard.

Why build a custom integration when DentalCanvas already reads your Open Dental data and shows you everything in a visual dashboard?

Try DentalCanvas

Was this article helpful?

Related Articles

opendentalsupport.com is an independent community resource. We are NOT affiliated with, endorsed by, or sponsored by Open Dental Software, Inc. Open Dental® is a registered trademark of Open Dental Software, Inc.