> For the complete documentation index, see [llms.txt](https://docs.pokko.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pokko.io/basic-features/getting-started.md).

# Querying content

## API Keys

To query content you will need to set up an API key.  This can be done from the project settings screen.

![Click the cog here to access the project settings](/files/-MdzUQkFKHN43T6egy4i)

Click the "New token" button under the "API Tokens" section.

![](/files/-MdzUb4GcMNF1wyxV-Px)

Click the "GraphQL Playground" button to open a website where you can start querying content.

In this UI you will need to specify the token that was generated.

Click "HTTP Headers" down the bottom and enter the following

```
{
  "X-Token": "<< API TOKEN >>"
}
```

With this in place, you can start querying your content.

## Queries

There are two ways of querying your content.

1. Querying individual pieces of content - `entry()`
2. Querying a list of content of a specific type  - `entries { }`

The GraphQL root query has two queries to access your content - `entry` and `entries`

More information about what queries are available can be found in the GraphQL Playground.

### Individual entries

With `entry` you can query individual entries by ID or by Path.

```graphql
query GetBlogPost {
  entry(id: "...") {
    ... on IBlogPost {
      id
      # additional fields here
    }
  }
}
```

### Multiple entries

With `entries` you can query multiple entries of a type.

```graphql
query ListBlogPosts {
  entries {
    allBlogPost(skip: 0, take: 10, filter: { ... }) {
      nodes {
        id
        # additional fields here
      }
      totalCount
    }
  }
}
```

## Caching

A layer of caching is in place for the content querying endpoints.  Content will be cached indefinitely until a change to your content is made.  When a Publish occurs on an entry the cache will be cleared.

The more complex a GraphQL query is, the longer the initial request will take.  Subsequent cached queries will be drastically faster.

## GraphQL endpoint

<mark style="color:green;">`POST`</mark> `https://<region>.pokko.io/:project/:environment/graphql`

This endpoint allows you to get free cakes.

#### Path Parameters

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| environment | string |             |
| project     | string |             |

#### Headers

| Name    | Type   | Description |
| ------- | ------ | ----------- |
| X-Token | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
