> ## Documentation Index
> Fetch the complete documentation index at: https://paragraph.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with the Paragraph SDK

The Paragraph SDK is a typescript wrapper around our REST API. All functionality in the SDK can be found in the [API Reference](/api-reference/), in the repository on [GitHub](https://github.com/paragraph-xyz/paragraph-sdk-js), or in the documentation on [NPM](https://www.npmjs.com/package/@paragraph-com/sdk).

## Getting started

Follow these steps to install & use the Paragraph typescript SDK.

<Info>
  **Prerequisites**:

  * Node.js version 18 or higher
</Info>

<Steps>
  <Step title="Install the Paragraph SDK">
    ```bash theme={null}
    npm i @paragraph-com/sdk
    ```
  </Step>

  <Step title="Instantiate the class">
    Instantiate the `ParagraphAPI` class.

    ```typescript theme={null}
    import { ParagraphAPI } from "@paragraph-com/sdk"

    // For public endpoints (no API key required)
    const api = new ParagraphAPI()

    // For protected endpoints (API key required)
    const apiWithAuth = new ParagraphAPI({ apiKey: "your-api-key" })
    ```
  </Step>

  <Step title="Query data">
    Query Paragraph data. All calls can be found in the [SDK repo](https://github.com/paragraph-xyz/paragraph-sdk-js) or on our [API reference](/api-reference/).

    ```typescript theme={null}
    // Fetch a publication by slug (use .single() for single object)
    const publication = await api.publications.get({ slug: "@blog" }).single()
    console.log(`Fetched publication: ${publication}`)

    // Fetch posts (paginated list)
    const { items: posts, pagination } = await api.posts.get({ publicationId: publication.id })

    console.log(`Fetched ${posts.length} posts from @blog, out of ${pagination.total} posts: ${JSON.stringify(posts)}`)
    ```
  </Step>
</Steps>
