Access the API

Important changes for the Tableau JavaScript API

As of February 2024, the Tableau JavaScript API is deprecated. Use the Embedding API v3 instead for embedding interactive views into web pages and applications. For guidance on embedding Tableau views, see the Tableau Embedding API v3 Help(Link opens in a new window).

The JavaScript API runs on Tableau Cloud, Tableau Public, and Tableau Server versions 10.5 and later. To use the JavaScript API, you need to include the JavaScript API file in your web page.

The JavaScript API files are located on the server (including Tableau Cloud and Tableau Public). There is no separate download for the files. You just specify the URL to the JavaScript API file in your web page, as described in the following section.

The JavaScript API file is a library that contains functions for interacting with the JavaScript API. The JavaScript API file is available in multiple versions, and each version of the Tableau JavaScript library corresponds to a specific version of Tableau Server. Additionally, for each version of the JavaScript API file, there is also a minified file that you can use in production environments to reduce the amount of data that browsers need to download.

JavaScript API Versions

The following table lists the JavaScript API library files and the corresponding versions of Tableau Server. For compatibility, you should use the version of the library that matches the version of Tableau you are using.

Tableau Server version JavaScript API files
2022.1 tableau-2.9.1.min.js.
2021.4 tableau-2.9.0.min.js
2021.3 tableau-2.8.3.min.js
2021.2 tableau-2.8.2.min.js
2021.1 tableau-2.8.0.min.js
2020.4 tableau-2.7.0.min.js
2020.3 tableau-2.6.0.min.js
2020.2 tableau-2.5.0.min.js
2020.1 tableau-2.4.0.min.js
2019.4 tableau-2.3.0.min.js
2019.3 tableau-2.3.0.min.js
2019.2 tableau-2.2.2.min.js
2019.1 tableau-2.2.2.min.js
2018.3 tableau-2.2.2.min.js
2018.2 tableau-2.2.2.min.js
2018.1 tableau-2.2.2.min.js
10.5 tableau-2.2.1.min.js

For Tableau Cloud and Tableau Public, use the latest version of the JavaScript API file.

Versioning Notes

  • Starting with Tableau Server 9.1, you can link to the JavaScript API file using only the major version number. Tableau Server returns the latest minor version of the JavaScript API file available. For example, if you link to the tableau-2.js file on Tableau Server 2020.1, Tableau Server returns the tableau-2.4.0.js file. Use the major version of the file to avoid updating code references for minor version changes. However, you can still get a specific minor version of the JavaScript API file by linking to it directly.

  • The version numbers for JavaScript API files has changed since the first release. Starting with Tableau Server 9.0, the version of the JavaScript API file is independent of the Tableau Server version. Each version uses the following convention:

    tableau_major-release.minor-release.update-release.js

    Previously, JavaScript API file versions matched the version of Tableau Server. For example, the tableau_v8.js file corresponded to Tableau Server 8.0.

  • Starting with Tableau Server 9.0, you can get the JavaScript API file from any location, including your own server, Tableau Public, and Tableau Cloud. JavaScript API files in all these locations are identical for a given version of the JavaScript API file. Use the version of the JavaScript API that corresponds to the version of Tableau Server you are on. The easiest way to make sure you're using the correct version is to use the JavaScript API library from the Server you are using.

  • Starting with Tableau Server 9.0, minified versions of the JavaScript API file are designated with the .min naming convention. Previously, the minified version did not use a naming convention. Instead, the full version of the file was designated with the .debug naming convention.

  • You can access non-minified versions of the library by removing .min from the filename. For example, for the latest version, you can use tableau-2.js

Where to Get the JavaScript API File

Starting with Tableau Server version 9.0, you can get the JavaScript API file from multiple locations, including Tableau Cloud and Tableau Public. However, if you get the JavaScript API file from the same server that hosts your visualizations, you can ensure that you always use a version of the file that is compatible with the server. Additionally, for versions of Tableau Server before 9.0, you must get the JavaScript API file from the same server that hosts your visualizations. Otherwise, the code may not work.

Add the following code to a web page to get the JavaScript API file:

<script src="https://YOUR-SERVER/javascripts/api/tableau-version.min.js"></script>

For example, you might enter the following code:

<script src="https://www.example.com/javascripts/api/tableau-2.min.js"></script>

For Tableau Cloud and Tableau Public, enter one of the following:

<script src="https://online.tableau.com/javascripts/api/tableau-version.min.js"></script>
<script src="https://public.tableau.com/javascripts/api/tableau-version.min.js"></script>

On Tableau Server, the JavaScript API files are stored in the following location:
Program Files\Tableau\Tableau Server\2022.4\wgserver\public\javascripts\api


Thanks for your feedback!Your feedback has been successfully submitted. Thank you!