---
title: Quickstart | Tabstack
description: Get up and running with Tabstack API in minutes. This guide will walk you through authentication setup and your first API calls.
---

## Prerequisites

- A programming environment (examples use curl, TypeScript, and Python)
- Basic knowledge of REST APIs

## Create and Setup Your API Key

Before you can start using Tabstack API, you’ll need to create an API key and set it up in your environment.

### 1. Create Your API Key

1. Visit the [Tabstack Console](https://console.tabstack.ai/)
2. Sign in to your account (or create one if you haven’t already)
3. Navigate to the API Keys section and click the “Manage API Keys”
4. Once you are on the API Keys page, Click “Create New API Key”
5. Give your key a descriptive name (e.g., “Development”, “Production”) and click the “Create API Key”
6. Copy the generated API key and store it securely

Your API key will only be shown once. Make sure to copy and store it in a secure location.

### 2. Set Up Environment Variable

For security and convenience, we recommend storing your API key as an environment variable rather than hardcoding it in your scripts.

macOS/Linux

Terminal window

```
# Add to your shell profile (~/.bashrc, ~/.zshrc, or ~/.bash_profile)
export TABSTACK_API_KEY="your_api_key_here"


# Or set it temporarily for the current session
export TABSTACK_API_KEY="your_api_key_here"


# Reload your shell or run:
source ~/.bashrc  # or ~/.zshrc
```

Windows (Command Prompt)

```
# Set temporarily for current session
set TABSTACK_API_KEY=your_api_key_here


# Set permanently (requires restart)
setx TABSTACK_API_KEY "your_api_key_here"
```

Windows (PowerShell)

```
# Set temporarily for current session
$env:TABSTACK_API_KEY = "your_api_key_here"


# Set permanently for current user
[Environment]::SetEnvironmentVariable("TABSTACK_API_KEY", "your_api_key_here", "User")
```

### 3. Verify Your Setup

Test that your environment variable is set correctly:

**macOS/Linux/Windows (Git Bash):**

Terminal window

```
echo $TABSTACK_API_KEY
```

**Windows (Command Prompt):**

Terminal window

```
echo %TABSTACK_API_KEY%
```

**Windows (PowerShell):**

Terminal window

```
echo $env:TABSTACK_API_KEY
```

You should see your API key printed in the terminal.

## Install an SDK

Every endpoint works over plain HTTP, so curl is enough to get a first response. For anything beyond that, install the SDK for your language:

- [TypeScript](#tab-panel-14)
- [Python](#tab-panel-15)

Terminal window

```
npm install @tabstack/sdk
```

Terminal window

```
pip install tabstack
```

The package names are not symmetrical. The TypeScript package is `@tabstack/sdk` on npm and the Python package is `tabstack` on PyPI. There is no `tabstack-sdk` package on PyPI.

For package manager alternatives (yarn, pnpm, bun, uv, poetry, pipenv), see the [TypeScript SDK Quickstart](/sdks/typescript/quickstart/index.md) or [Python SDK Quickstart](/sdks/python/quickstart/index.md).

## Authentication

Tabstack API uses API key authentication. Include your API key in the `Authorization` header:

Terminal window

```
Authorization: Bearer $TABSTACK_API_KEY
```

Now that you have your environment variable set up, you can use `$TABSTACK_API_KEY` (or `%TABSTACK_API_KEY%` on Windows Command Prompt) in your curl commands.

## Your First API Call

The examples below use placeholder URLs like `example.com`, `blog.example.com`, etc. To test these endpoints successfully, replace these with real, accessible URLs from actual websites you want to fetch content from.

Let’s start with a simple markdown conversion to verify your setup:

- [curl](#tab-panel-16)
- [TypeScript](#tab-panel-17)
- [Python](#tab-panel-18)

Terminal window

```
curl -X POST "https://api.tabstack.ai/v1/extract/markdown" \
  -H "Authorization: Bearer $TABSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com"
  }'
```

```
import Tabstack from "@tabstack/sdk";


const client = new Tabstack({
  apiKey: process.env.TABSTACK_API_KEY!,
});


try {
  const result = await client.extract.markdown({
    url: "https://example.com",
  });
  console.log(result.content);
} catch (error) {
  console.error("Error:", error);
}
```

```
import os
from tabstack import Tabstack


with Tabstack(api_key=os.getenv('TABSTACK_API_KEY')) as client:
    try:
        result = client.extract.markdown(url='https://example.com')
        print(result.content)
    except Exception as error:
        print(f'Error: {error}')
```

**Response** (raw HTTP body; the SDKs return the same fields as a typed object, so `result.content` holds the markdown):

```
{
  "url": "https://example.com",
  "content": "---\ntitle: Example Domain\ndescription: Example Domain\nurl: https://example.com\ntype: website\n---\n\n# Example Domain\n\nThis domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.\n\n[More information...](https://www.iana.org/domains/example)"
}
```

## Extract structured JSON

Markdown proves your key works. The endpoint most people come for is `/extract/json`: you define a schema, and you get back data in that shape.

- [curl](#tab-panel-19)
- [TypeScript](#tab-panel-20)
- [Python](#tab-panel-21)

Terminal window

```
curl -X POST "https://api.tabstack.ai/v1/extract/json" \
  -H "Authorization: Bearer $TABSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "json_schema": {
      "type": "object",
      "properties": {
        "stories": {
          "type": "array",
          "description": "Front page stories",
          "items": {
            "type": "object",
            "properties": {
              "title": { "type": "string", "description": "Story headline" },
              "points": { "type": "number", "description": "Score in points" }
            }
          }
        }
      }
    }
  }'
```

```
import Tabstack from "@tabstack/sdk";


const client = new Tabstack({
  apiKey: process.env.TABSTACK_API_KEY!,
});


try {
  const result = await client.extract.json({
    url: "https://news.ycombinator.com",
    json_schema: {
      type: "object",
      properties: {
        stories: {
          type: "array",
          description: "Front page stories",
          items: {
            type: "object",
            properties: {
              title: { type: "string", description: "Story headline" },
              points: { type: "number", description: "Score in points" },
            },
          },
        },
      },
    },
  });
  console.log(result);
} catch (error) {
  console.error("Error:", error);
}
```

```
import os
from tabstack import Tabstack


with Tabstack(api_key=os.getenv('TABSTACK_API_KEY')) as client:
    try:
        result = client.extract.json(
            url='https://news.ycombinator.com',
            json_schema={
                'type': 'object',
                'properties': {
                    'stories': {
                        'type': 'array',
                        'description': 'Front page stories',
                        'items': {
                            'type': 'object',
                            'properties': {
                                'title': {'type': 'string', 'description': 'Story headline'},
                                'points': {'type': 'number', 'description': 'Score in points'},
                            },
                        },
                    },
                },
            },
        )
        print(result)
    except Exception as error:
        print(f'Error: {error}')
```

The parameter is `json_schema`, not `schema`. Those `description` fields are not decoration: they tell the extractor what to look for, and they are the single biggest factor in extraction quality. See [Schema Design](/guides/schema-design/index.md) before you write a real one, including [what a field returns when it can’t be filled](/guides/schema-design#what-you-get-back-when-a-field-cant-be-filled/index.md).

## Next Steps

Now that you’re up and running:

1. **Go deeper on your SDK**: [TypeScript SDK Quickstart](/sdks/typescript/quickstart/index.md) or [Python SDK Quickstart](/sdks/python/quickstart/index.md)
2. **Explore Examples**: Check out our [Price Monitor Example](/examples/price-monitor/index.md) to see how to build a real-world application
3. **Plan your capacity**: [Rate Limits](/production/rate-limits/index.md) covers requests per minute per plan, and [Pricing](/pricing/index.md) covers what each endpoint costs in credits
4. **API Reference**: Review the [API Reference](/api/index.md) for detailed endpoint documentation

## Need Help?

- Documentation: [docs.tabstack.ai](https://docs.tabstack.ai)
- Support: <support@tabstack.ai>
