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

# Search Social Posts

> Search posts on LinkedIn, Twitter/X and Reddit

Search posts by keyword across platforms. Every platform returns the **same
normalized post schema**, so you parse LinkedIn, Twitter and Reddit results
identically. Each post carries its author — a lead you can pass to
[Enrich Profile](/api-reference/enrich-profile).

## Credit Cost

| Mode         | Credits                        |
| ------------ | ------------------------------ |
| All searches | 1 credit per 10 posts returned |

***

## Request Body

<ParamField body="platform" type="string" default="linkedin">
  Platform to search: `linkedin`, `twitter`, or `reddit`.
</ParamField>

<ParamField body="keyword" type="string">
  Search keyword or phrase in the post content (e.g., `"looking for a CRM"`). On Twitter you can use advanced operators (`OR`, quoted phrases, `-word`).
</ParamField>

<ParamField body="match" type="string" default="strict">
  Keyword matching mode:

  * `strict` (default) — only returns posts whose text **actually contains** the searched terms. Platforms match loosely by default (a keyword can appear only as a stock ticker, inside a link, or scattered across the post), so strict mode filters that noise out. Bare words are required (AND); quoted phrases are alternatives (OR).
  * `loose` — returns the platform's raw results without post-filtering.
</ParamField>

<ParamField body="date_posted" type="string">
  Freshness of the posts: `past_24h`, `past_week`, `past_month`. Mapped to each platform's native time window.
</ParamField>

<ParamField body="sort_by" type="string" default="date_posted">
  Ordering: `date_posted` (freshest first) or `relevance` (most relevant/engaged).
</ParamField>

<ParamField body="subreddit" type="string">
  **Reddit only.** Restrict the search to one subreddit (e.g., `"SaaS"`).
</ParamField>

<ParamField body="author_company" type="string">
  **LinkedIn only.** Restrict to posts by employees of a company — pass a name (auto-resolved to the company) or a numeric LinkedIn company ID.
</ParamField>

<ParamField body="author_industry" type="string">
  **LinkedIn only.** Restrict to authors in an industry.
</ParamField>

<ParamField body="author_job_title" type="string">
  **LinkedIn only.** Restrict to authors with a job title (e.g., `"Head of Sales"`).
</ParamField>

<ParamField body="content_type" type="string">
  **LinkedIn only.** Restrict to a content type: `ARTICLE`, `VIDEO`, `PHOTO`, `DOCUMENT`.
</ParamField>

<ParamField body="offset" type="integer" default="0">
  Number of results to skip for pagination (LinkedIn).
</ParamField>

<ParamField body="count" type="integer" default="25">
  Number of posts to return.
</ParamField>

***

## Response

<ResponseField name="total" type="integer">
  Total matching posts on LinkedIn; a lower bound (enumerated so far) on Twitter/Reddit, which expose no global count — use `has_next` to know if more exist.
</ResponseField>

<ResponseField name="offset" type="integer">
  Offset used for pagination.
</ResponseField>

<ResponseField name="count" type="integer">
  Number of results returned in this response.
</ResponseField>

<ResponseField name="has_next" type="boolean">
  Whether more results are available.
</ResponseField>

<ResponseField name="credits_used" type="number">
  Credits used for this search.
</ResponseField>

<ResponseField name="results" type="array">
  List of posts, normalized across platforms. Same core fields everywhere; a few platform-specific extras on top.

  <Expandable title="post properties">
    <ResponseField name="post_id" type="string">Platform post ID</ResponseField>
    <ResponseField name="platform" type="string">Source platform (`linkedin`, `twitter`, `reddit`)</ResponseField>
    <ResponseField name="url" type="string">URL of the post</ResponseField>
    <ResponseField name="text" type="string">Post text content</ResponseField>
    <ResponseField name="created_at" type="string">Publication date</ResponseField>
    <ResponseField name="is_repost" type="boolean">Whether the post is a repost/retweet/reshare</ResponseField>
    <ResponseField name="author_handle" type="string">Author handle / public identifier — pass to Enrich Profile</ResponseField>
    <ResponseField name="author_name" type="string">Author display name</ResponseField>
    <ResponseField name="author_bio" type="string">Author headline/bio</ResponseField>
    <ResponseField name="author_followers" type="integer">Author follower count (when exposed)</ResponseField>
    <ResponseField name="author_verified" type="boolean">Whether the author is verified</ResponseField>
    <ResponseField name="like_count" type="integer">Likes (Twitter/LinkedIn) or upvotes (Reddit)</ResponseField>
    <ResponseField name="comment_count" type="integer">Number of comments/replies</ResponseField>
    <ResponseField name="repost_count" type="integer">Reposts/retweets/reshares</ResponseField>
    <ResponseField name="view_count" type="integer">Views (when exposed)</ResponseField>
    <ResponseField name="subreddit" type="string">Reddit only — the subreddit</ResponseField>
  </Expandable>
</ResponseField>

***

<RequestExample>
  ```bash Twitter theme={null}
  curl -X POST https://api.dataforb2b.ai/search/posts \
    -H "api_key: YOUR_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "platform": "twitter",
      "keyword": "(\"anyone recommend\" OR \"looking for\") CRM",
      "date_posted": "past_week",
      "count": 25
    }'
  ```

  ```bash Reddit theme={null}
  curl -X POST https://api.dataforb2b.ai/search/posts \
    -H "api_key: YOUR_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "platform": "reddit",
      "keyword": "CRM recommendation",
      "subreddit": "SaaS",
      "sort_by": "relevance",
      "count": 25
    }'
  ```

  ```bash LinkedIn theme={null}
  curl -X POST https://api.dataforb2b.ai/search/posts \
    -H "api_key: YOUR_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "platform": "linkedin",
      "keyword": "CRM",
      "author_company": "Salesforce",
      "date_posted": "past_week",
      "count": 25
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "total": 25,
    "offset": 0,
    "count": 1,
    "has_next": true,
    "credits_used": 1,
    "results": [
      {
        "post_id": "1811640448000000000",
        "platform": "twitter",
        "url": "https://x.com/janedoe/status/1811640448000000000",
        "text": "anyone got a CRM recommendation that does round-robin without the enterprise upsell?",
        "created_at": "2026-07-10T14:22:03Z",
        "is_repost": false,
        "author_handle": "janedoe",
        "author_name": "Jane Doe",
        "author_bio": "Head of RevOps @ Acme",
        "author_followers": 4200,
        "author_verified": false,
        "like_count": 8,
        "comment_count": 3,
        "repost_count": 0,
        "view_count": 900
      }
    ]
  }
  ```
</ResponseExample>
