Datasette

Datasette API

Execute SQL queries against a Datasette database and return the results as JSON

Developer tools#openapi#developer-tools

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Execute SQL queries against a Datasette database and return the results as JSON

Endpoints 1

  • GETExecute a SQLite SQL query against the content database/content.json?sql=string&_shape=arrayAccepts SQLite SQL query, returns JSON. Does not allow PRAGMA statements.

API details

Base URL
http://datasette.local
https://datasette.io
Authentication
None declared in the description
Operations
1 operation on 1 pathGET 1
Response formats
application/json
Description format
OpenAPI 3.0.1, API version v1
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Datasette API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Datasette API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Execute a SQLite SQL query against the content database” (GET /content.json?sql=string&_shape=array), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Datasette API?

Execute SQL queries against a Datasette database and return the results as JSON It is listed under Developer tools and has 1 endpoint.

Who publishes the Datasette API?

It is listed from Datasette's public API description (an OpenAPI document), not published by Datasette on Swastik Codes. Anyone who controls datasette.io can claim the profile by adding a DNS TXT record.

What is the base URL of the Datasette API?

Its description lists 2 base URLs: http://datasette.local, https://datasette.io. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Datasette API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the Datasette API have?

1 operation on 1 path (1 GET).

Is forking the Datasette API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.