---
title: "Quickstart"
description: "Get a key and make your first call in about a minute."
canonical_url: https://groundsocial.dev/docs/quickstart
---
# Quickstart

> Get a key and make your first call in about a minute.

> ## Agent Instructions
> The Groundsocial REST API is at https://api.groundsocial.dev (OpenAPI: https://groundsocial.dev/openapi.json). Set yourself up with https://groundsocial.dev/SKILL.md; the MCP server is https://api.groundsocial.dev/mcp. Every docs page is Markdown at its URL plus `.md`; the index is https://groundsocial.dev/llms.txt.

> **Not on npm yet** The SDK, CLI and stdio MCP server are not published yet. Until they are, use the REST API or the remote MCP server, and don't install packages named `@groundsocial/…` from npm: they aren't ours.

## 1. Get a key

- **A person:** sign in at [the dashboard](https://groundsocial.dev/app) with your email and create a key. You get 100 free credits, no card.
- **An agent:** `POST https://api.groundsocial.dev/v1/agent/signup` returns a key with no human involved. See [Authentication](https://groundsocial.dev/docs/authentication#agent-self-signup).

Keys start with `gs_live_` and are shown once. Keep yours in the `GROUNDSOCIAL_API_KEY` environment variable; every sample here reads it from there.

```bash
export GROUNDSOCIAL_API_KEY="gs_live_…"
```

## 2. Make a call

Fetch one thread with its comment tree. The id can also be a `t3_` fullname or the thread URL.

cURL:

```bash
curl "https://api.groundsocial.dev/v1/reddit/posts/1y3k9qa" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"
```

TypeScript:

```ts
import { createClient } from '@groundsocial/sdk'

const client = createClient({ apiKey: process.env.GROUNDSOCIAL_API_KEY })
const { post, comments } = await client.reddit.post('1y3k9qa')
console.log(post.data.title, comments.data.children.length)
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/reddit/posts/1y3k9qa",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
thread = res.json()
print(thread["post"]["data"]["title"])
```

The response is `{ post, comments }`: a `t3` Thing and a `Listing` of `t1` comments, with collapsed branches as `more` items. Two headers tell you what it cost: `x-credits-charged` and `x-credits-remaining`.

## 3. Install the SDK (optional)

```bash
npm i @groundsocial/sdk
```

```ts
import { createClient } from '@groundsocial/sdk'

const client = createClient({ apiKey: process.env.GROUNDSOCIAL_API_KEY })

// One page:
const page = await client.reddit.subredditPosts('typescript', { sort: 'new' })

// Or every post across pages, stopping at 250 (each page is one call):
for await (const post of client.reddit.subredditPosts('typescript').items({ maxItems: 250 })) {
  console.log(post.data.title)
}
```

## 4. Already on PRAW?

Change one URL. Point `oauth_url` and `reddit_url` at `https://reddit.groundsocial.dev` and pass your key as the client secret. Your reads work unchanged. See [PRAW & snoowrap](https://groundsocial.dev/docs/praw).

```python
reddit = praw.Reddit(
    client_id="groundsocial",
    client_secret=os.environ["GROUNDSOCIAL_API_KEY"],
    user_agent="my-app/1.0",
    oauth_url="https://reddit.groundsocial.dev",
    reddit_url="https://reddit.groundsocial.dev",
)
```

## Next

- [Every endpoint](https://groundsocial.dev/docs/api) with parameters and response fields.
- [Errors](https://groundsocial.dev/docs/errors): every code, and whether to retry.
- [MCP server](https://groundsocial.dev/docs/mcp) for Claude, Cursor and ChatGPT.

## Examples

cURL:

```bash
curl "https://api.groundsocial.dev/v1/reddit/posts/1y3k9qa" \
  -H "Authorization: Bearer $GROUNDSOCIAL_API_KEY"
```

TypeScript:

```ts
import { createClient } from '@groundsocial/sdk'

const client = createClient({ apiKey: process.env.GROUNDSOCIAL_API_KEY })
const { post, comments } = await client.reddit.post('1y3k9qa')
console.log(post.data.title, comments.data.children.length)
```

Python:

```python
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/reddit/posts/1y3k9qa",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
thread = res.json()
print(thread["post"]["data"]["title"])
```

_Canonical HTML: https://groundsocial.dev/docs/quickstart_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial docs](https://groundsocial.dev/docs.md)
- [Authentication](https://groundsocial.dev/docs/authentication.md)
- [Credits and payments](https://groundsocial.dev/docs/payments.md)
- [Rate limits](https://groundsocial.dev/docs/rate-limits.md)
- [Errors](https://groundsocial.dev/docs/errors.md)
- [Data freshness and caching](https://groundsocial.dev/docs/freshness.md)
- [MCP server](https://groundsocial.dev/docs/mcp.md)
- [SKILL.md, llms.txt and Markdown twins](https://groundsocial.dev/docs/skill.md)
- [CLI](https://groundsocial.dev/docs/cli.md)
- [TypeScript SDK](https://groundsocial.dev/docs/sdk.md)
- [PRAW and snoowrap](https://groundsocial.dev/docs/praw.md)
- [Legal and compliance](https://groundsocial.dev/docs/compliance.md)
- [API reference](https://groundsocial.dev/docs/api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://groundsocial.dev/docs"},{"@type":"ListItem","position":3,"name":"Quickstart","item":"https://groundsocial.dev/docs/quickstart"}]}
```
