# WordPress API

> Returns posts, categories and tags from a WordPress site, including posts filtered by tag or category and single posts by id.

Category: News & Media. Region: global. 10 endpoints at `https://api.hoshime.com/v1/wordpress/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/wordpress
## GET /v1/wordpress/posts

One page of a WordPress site's published posts, newest first, optionally searched.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `query` | string | no | Words to search the posts for. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/posts?domain=techcrunch.com&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/post

One post of a WordPress site by its id.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `id` | string | yes | Post id, the number the REST API gives the post. (e.g. 3185721) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/post?domain=techcrunch.com&id=3185721" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/pages

One page of a WordPress site's static pages, such as About or Contact, optionally searched.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. 9to5mac.com) |
| `query` | string | no | Words to search the pages for. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/pages?domain=9to5mac.com&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/categories

One page of a WordPress site's post categories.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `limit` | integer | no | Items per page, 1 to 100. (default 50; e.g. 3) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `count` (integer (int64)), `description` (string), `id` (string), `name` (string), `slug` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/categories?domain=techcrunch.com&limit=3" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/tags

One page of a WordPress site's post tags, with the number of posts under each.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `query` | string | no | Words to search the tag names for. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `count` (integer (int64)), `id` (string), `name` (string), `slug` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/tags?domain=techcrunch.com&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/tagPosts

One page of the posts under one tag, newest first.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `tag` | integer | yes | Tag id as listed by tags. (e.g. 30863066) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/tagPosts?domain=techcrunch.com&tag=30863066&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/categoryPosts

One page of the posts in one category, newest first.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `category` | integer | yes | Category id as listed by categories. (e.g. 577030455) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/categoryPosts?domain=techcrunch.com&category=577030455&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/authors

One page of a WordPress site's public authors, with their name, bio and avatar. Sites that hide their user list answer not found.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. 9to5mac.com) |
| `query` | string | no | Words to search the author names for. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `avatarUrl` (string), `bio` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/wordpress/authors?domain=9to5mac.com&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/authorPosts

One page of the posts one author wrote, newest first.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. 9to5mac.com) |
| `author` | integer | yes | Author id as listed by authors. (e.g. 385330) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `categories` (CategoryID[]), `categories[].id` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `slug` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/authorPosts?domain=9to5mac.com&author=385330&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/wordpress/comments

One page of the approved comments on one post, oldest first, with the author name and text.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | Site domain, such as techcrunch.com. A hostname only: no scheme, path, port or IP address. (e.g. techcrunch.com) |
| `post` | integer | yes | Post id as listed by posts. (e.g. 2910489) |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 2) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `parentId` (string), `postId` (string), `replyCount` (integer (int64)), `text` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/wordpress/comments?domain=techcrunch.com&post=2910489&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
