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

# LinkedIn Post Search

> Sell linkedin.search_posts on AnyAPI: the request your endpoint receives, the response it must return, and what the real-request check judges.

Search public LinkedIn posts by keyword (text, link, publish date). Results come from search-engine matches over public LinkedIn posts and work best with English keywords.

This page is the seller-facing summary of one catalog API, `linkedin.search_posts`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$1.20 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `cursor` | string | no | Pagination cursor from a previous response. |
| `datePosted` | string | no | Filter by recency. One of last-hour, last-day, last-week, last-month, last-year. One of: `last-hour`, `last-day`, `last-week`, `last-month`, `last-year`. |
| `query` | string | yes | The post search query. |
| `requireCursor` | boolean | no | Deprecated. Every source for this search returns a nextCursor, so this changes nothing about the price or which source serves you; it stays accepted so callers that already send it keep working. |

> [accordion] Full input JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/linkedin.search_posts.input.json",
>   "example": {
>     "query": "hiring",
>     "datePosted": "last-week"
>   },
>   "title": "LinkedIn post search input",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "query"
>   ],
>   "properties": {
>     "query": {
>       "type": "string",
>       "description": "The post search query."
>     },
>     "datePosted": {
>       "type": "string",
>       "enum": [
>         "last-hour",
>         "last-day",
>         "last-week",
>         "last-month",
>         "last-year"
>       ],
>       "description": "Filter by recency. One of last-hour, last-day, last-week, last-month, last-year."
>     },
>     "cursor": {
>       "type": "string",
>       "description": "Pagination cursor from a previous response."
>     },
>     "requireCursor": {
>       "type": "boolean",
>       "deprecated": true,
>       "description": "Deprecated. Every source for this search returns a nextCursor, so this changes nothing about the price or which source serves you; it stays accepted so callers that already send it keep working."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | The search result, or null when not found. |
| `data.nextCursor` | string or null | no | Opaque cursor for the next page of posts, or null when this lane has no more. Pass it back as cursor to continue. |
| `data.posts` | array | yes | Posts matching the search query. |
| `data.posts[].authorName` | string | no | Display name of the post's author. Empty when the upstream omits it. |
| `data.posts[].authorUrl` | string | no | Canonical profile URL of the post's author, with tracking query params stripped. Empty when the upstream omits it. |
| `data.posts[].avatarUrl` | string | no | URL of the post author's profile avatar image. |
| `data.posts[].commentCount` | integer | no | Total number of comments on the post. |
| `data.posts[].createdUtc` | number | yes | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| `data.posts[].id` | string | yes | The post's LinkedIn activity ID, as a string. |
| `data.posts[].reactionCount` | integer | no | Total number of reactions on the post. |
| `data.posts[].text` | string | yes | Text content of the post. |
| `data.posts[].url` | string | yes | Canonical URL of the post. |
| `found` | boolean | yes | Whether matching posts were found. |

Extra fields are kept, missing declared fields fail.

> [accordion] Full output JSON Schema
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/linkedin.search_posts.output.json",
>   "title": "LinkedIn post search output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean",
>       "description": "Whether matching posts were found."
>     },
>     "data": {
>       "description": "The search result, or null when not found.",
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "posts"
>           ],
>           "properties": {
>             "nextCursor": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Opaque cursor for the next page of posts, or null when this lane has no more. Pass it back as cursor to continue."
>             },
>             "posts": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "description": "Posts matching the search query.",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "id",
>                   "url",
>                   "text",
>                   "createdUtc"
>                 ],
>                 "properties": {
>                   "id": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "The post's LinkedIn activity ID, as a string."
>                   },
>                   "url": {
>                     "x-anyapi-domain": "linkedin.com",
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Canonical URL of the post."
>                   },
>                   "text": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string",
>                     "description": "Text content of the post."
>                   },
>                   "authorName": {
>                     "type": "string",
>                     "description": "Display name of the post's author. Empty when the upstream omits it."
>                   },
>                   "authorUrl": {
>                     "x-anyapi-domain": "linkedin.com",
>                     "type": "string",
>                     "description": "Canonical profile URL of the post's author, with tracking query params stripped. Empty when the upstream omits it."
>                   },
>                   "reactionCount": {
>                     "type": "integer",
>                     "description": "Total number of reactions on the post."
>                   },
>                   "commentCount": {
>                     "type": "integer",
>                     "description": "Total number of comments on the post."
>                   },
>                   "createdUtc": {
>                     "x-anyapi-must-populate": true,
>                     "type": "number",
>                     "description": "UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds."
>                   },
>                   "avatarUrl": {
>                     "x-anyapi-domain": "licdn.com",
>                     "type": "string",
>                     "description": "URL of the post author's profile avatar image."
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `createdUtc`
* `id`
* `posts`
* `text`
* `url`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `posts` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "query": "hiring",
  "datePosted": "last-week"
}
```

The registration tests send this example to your endpoint, with the API's other test inputs. After that, the real-request check sends your endpoint real past customer inputs, and an AI reviewer compares each answer with AnyAPI's own answer to the same input.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the real-request check.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.