> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/introduction.md

## Article Content:

# About the Posts and Stats API

The Posts and Stats API allows you to retrieve and manage blog posts. A post is a published article written for a blog.

With the Posts and Stats API, you can:

- Retrieve and display [a post](https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/get-post.md) or [a list of posts](https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/list-posts.md).
- [Query posts](https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/query-posts.md) based on specific filters.
- [Retrieve the metrics](https://dev.wix.com/docs/api-reference/business-solutions/blog/posts-stats/get-post-metrics.md) of a post to analyze engagement and performance.
- [Increment a post's view count](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/view-post.md) when a site visitor views the post.

Learn more about [Wix Blog](https://support.wix.com/en/article/wix-blog-about-the-wix-blog).

## Before you begin

It’s important to note the following before starting to code:

+ With [Wix Pricing Plans](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/introduction.md), exclusive blog content can only be accessed by readers with a subscription. Learn more about [creating blog post subscriptions](https://support.wix.com/en/article/wix-blog-creating-blog-post-subscriptions).

+ With [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview), a blog can be translated into multiple languages. Learn more about [translating a blog](https://support.wix.com/en/article/wix-multilingual-translating-your-blog).
  > **Note:** `translationId` is only returned in a post object if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed.

## Blog roles
Collaborators can create and manage blogs based on certain roles: 
- **Blog editors** can fully manage the blog, but not other areas of a site.
- **Blog writers** can create and publish their own posts on a blog.
- **Guest writers** can create posts, but can't publish them. 

## Terminology

- **Post**: A published article on a blog. It is also referred to as a publication. A blog can have up to 100,000 posts.
- **Draft Post**: An article written by a Wix user, blog editor, blog writer, or a guest writer that is not yet published.
- **Category**: A group of similar and related posts. A post can be assigned to a maximum of 10 categories.
- **Tag**: A way to further sort and organize blog posts. Tags provide the ability to filter blog posts.

## SDK Setup
  `@wix/blog`

To use the API, install the `@wix/blog` package.

#### Install the package

Follow the installation instructions for your development environment.

| Development environment | Installation method |
|--|--|
| Wix sites (editor or IDE) | Use the [package manager](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-in-the-editor.md). |
| Wix sites (local IDE) | Run `wix install @wix/blog` using the [Wix CLI](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/packages/work-with-npm-packages-with-the-wix-cli.md).|
| Blocks apps | Use the same installation method as Wix sites. |
| CLI and self-hosted apps | Run `npm install @wix/blog` or `yarn add @wix/blog`. |
| Headless sites and apps | Run `npm install @wix/blog` or `yarn add @wix/blog`. |

#### Import the package

To import the package in your code:

```js
import { posts } from '@wix/blog'
```

#### Import types

Types for this API are accessed through the `posts` namespace you already imported above, as `posts.<TypeName>`, using any type name shown in these docs.
  