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

# .get()

> Fetch a single article

```javascript theme={null}
openbridge.articles.get(idOrHandle, blogHandle?)
openbridge.articles.get(idOrHandle).blog(blogHandle).select(fields)
```

Fetches a single article by handle or Shopify GID. Supports chaining `.blog()` and `.select()` to configure the query.

## Parameters

| Param        | Type     | Required | Description                                            |
| ------------ | -------- | -------- | ------------------------------------------------------ |
| `idOrHandle` | `string` | Yes      | Article handle or Shopify GID                          |
| `blogHandle` | `string` | No       | Blog handle (required when fetching by article handle) |

<Info>When fetching by handle, you must either use `.blog()` or pass the `blogHandle` parameter.</Info>

## Returns

[`ShopifyArticle`](/api/types/articles#shopifyarticle) `| null`

## Examples

### Get by handle

```javascript theme={null}
const article = await openbridge.articles.get('my-first-post', 'news')

if (article) {
    console.log(article.title)
}
```

### Get by handle with .blog()

```javascript theme={null}
const article = await openbridge.articles
    .get('my-first-post')
    .blog('news')
```

### Get by Shopify GID

```javascript theme={null}
const article = await openbridge.articles.get(
    'gid://shopify/Article/123456789'
)
```

### With field selection

```javascript theme={null}
const article = await openbridge.articles
    .get('gid://shopify/Article/123456789')
    .select(['title', 'handle', 'content', 'image', 'author'])
```

### Handle not found

```javascript theme={null}
const article = await openbridge.articles.get('non-existent', 'news')

if (!article) {
    console.log('Article not found')
}
```
