Home Products Documentation

Connect with psql

LSD (LSD SQL Database) is postgres-compatible meaning you can connect to our public instance like you would any Postgres database

$ psql -h lsd.so -U you

you=> SELECT title FROM https://lsd.so

Connect with a driver

It then follows that you could also use LSD with a database driver; here's what that looks like with Python

import psycopg2

conn = psycopg2.connect("dbname='you' host='lsd.so'")
with conn.cursor() as curs:
  curs.execute("SELECT title FROM https://lsd.so")
  row = curs.fetchone()
  print(row)

Connect to our REST API

If you'd like to leverage LSD from a client-side application, you can make a request to our /api endpoint with your code in the query query parameter

fetch(
  `https://lsd.so/api?query=${
    encodeURIComponent(
      "SELECT title FROM https://lsd.so"
    )
  }`
);