> For the complete documentation index, see [llms.txt](https://docs.usesql.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usesql.com/tutorials/querying-stackby-tables.md).

# Querying StackBy Tables

### Step 1: Find The StackBy Table You Want To Include

Create or find a table that you would like to query, and copy it's url from the browser.

![](https://962311112-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWWPjAAbsh1Gxo2Coo8%2F-MZrlKOwGQSj4nrlmTv3%2F-MZyVjBf-l0DMUXr7glQ%2Fstackby-table.png?alt=media\&token=d6e45da2-05c9-4b48-aa13-bba88b0b9875)

### Step 2: Retrieve Your StackBy API Key

Login to your StackBy account, and navigate to your Account page.

![](https://962311112-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWWPjAAbsh1Gxo2Coo8%2F-MZrlKOwGQSj4nrlmTv3%2F-MZyVwbY3SOMD-RITLX_%2Fstackby-dashboard.png?alt=media\&token=d8acf6b6-02b4-4654-980c-817dccdc1587)

Once on the account page if you havent created an API Key click the Create API Key button.

![](https://962311112-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWWPjAAbsh1Gxo2Coo8%2F-MZrlKOwGQSj4nrlmTv3%2F-MZyW0T6rYLAsp1PZWhZ%2Fstackby-account-create-key.png?alt=media\&token=6f0989b6-af32-4c80-9ae9-79ebb81fe10b)

Once you have this key, make it visible, and save it somewhere for the next step where we build our query.

![](https://962311112-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MWWPjAAbsh1Gxo2Coo8%2F-MZrlKOwGQSj4nrlmTv3%2F-MZyW9hGxqU3yxNH9mpp%2Fstackby-account-page.png?alt=media\&token=6c50e648-032c-429c-b3ac-ba912841fda3)

### Step 3: Build Your SQL Query

After this you just need to add the url as the table you want to query from with the api key provided as a query parameter. An example is shown below along with a link to the query in the sandbox.

`SELECT * FROM "https://stackby.com/stack/stJMXZMzvH293NHq3S/tbl1575000948100df97c5?api-key={YOUR-KEY}"`[\[ sandbox \]](https://www.usesql.com/demo?query=SELECT%20*%20FROM%20%22https%3A%2F%2Fstackby.com%2Fstack%2FstJMXZMzvH293NHq3S%2Ftbl1575000948100df97c5%3Fapi-key%3DR8Nt2XYfnfO534O3%22\&format=html)
