---
title: "Search Posts Endpoint"
method: POST
path: "/search/posts"
tags: ["search"]
---

# Search Posts Endpoint

`POST /search/posts`

## Request

- Base URL: `https://api.dataforb2b.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dataforb2b.ai/search/posts`
- Auth: none declared

Search LinkedIn posts with advanced filters

**Authentification requise:** Header `api_key: <your_api_key>`

**Tarification:** 1 credit per 10 posts returned

Search for LinkedIn posts using various filters like author company,
industry, job title, content type, date, mentions, etc.

**Available filters:**

| Filter | Description | Example |
|--------|-------------|---------|
| `keyword` | Search in post content | "AI startup" |
| `author_company` | Author's company name | "Google" |
| `author_industry` | Author's industry | "Technology" |
| `author_job_title` | Author's job title | "CEO" |
| `content_type` | Post type | ARTICLE, VIDEO, PHOTO, DOCUMENT |
| `date_posted` | Time filter | past_24h, past_week, past_month |
| `from_member` | Author's member URN | "ACoAABxxxxxx" |
| `from_organization` | Company ID (numeric) | "1234567" |
| `mentions_member` | Mentioned member URN | "ACoAABxxxxxx" |
| `mentions_organization` | Mentioned org ID | "1234567" |
| `posted_by` | Relationship filter | first, following, first,following |
| `sort_by` | Sort order | date_posted (default), relevance |

**Example request:**
```json
{
    "keyword": "AI",
    "author_company": "Google",
    "content_type": "ARTICLE",
    "date_posted": "past_week",
    "sort_by": "date_posted",
    "count": 20
}
```

**Example response:**
```json
{
    "total": 150,
    "offset": 0,
    "count": 20,
    "has_next": true,
    "credits_used": 2,
    "results": [
        {
            "urn": "urn:li:share:xxx",
            "url": "https://linkedin.com/feed/update/...",
            "content": "Post content here...",
            "likes": 150,
            "comments": 25,
            "shares": 10,
            "posted_date": "2024-01-15",
            "posted_days_ago": 3,
            "author": {
                "name": "John Doe",
                "headline": "CEO at Google",
                "profile_url": "https://linkedin.com/in/johndoe",
                "profile_picture": "https://..."
            },
            "images": []
        }
    ]
}
```

## Headers

- `api-key` string, nullable

## Request body

- SearchPostsRequest: Request for searching posts across platforms (LinkedIn, Twitter/X, Reddit).
  - `platform` string: Platform to search: linkedin, twitter, or reddit.
  - `keyword` string, nullable: Search keyword in post content
  - `match` string: Keyword matching: 'strict' (default) keeps only posts whose text actually contains the searched terms; 'loose' returns the platform's raw results.
  - `post_url` string, nullable: Target a single post by URL (LinkedIn/Twitter/Reddit) instead of a keyword search. Use with `include` to get its engagers.
  - `include` string[], nullable: Attach engagers to each returned post: any of ['reactions', 'comments']. Each engager is a lead. (Reddit exposes comments only — no upvoters.)
  - `engagement_count` integer: Max engagers per type, per post, when `include` is set (1-1000).
  - `subreddit` string, nullable: Reddit only: restrict the search to one subreddit (e.g. 'SaaS').
  - `author_company` string, nullable: Filter by author's company name
  - `author_industry` string, nullable: Filter by author's industry
  - `author_job_title` string, nullable: Filter by author's job title
  - `content_type` string, nullable: Filter by content type: ARTICLE, VIDEO, PHOTO, DOCUMENT
  - `date_posted` string, nullable: Filter by date: past_24h, past_week, past_month
  - `from_member` string, nullable: Filter by member URN (profile entity URN, e.g., ACoAABxxxxxx)
  - `from_organization` string, nullable: Filter by organization/company ID (numeric)
  - `mentions_member` string, nullable: Filter by mentioned member URN
  - `mentions_organization` string, nullable: Filter by mentioned organization ID
  - `posted_by` string, nullable: Filter by relationship: first, following, first,following
  - `sort_by` string: Sort order: date_posted or relevance
  - `offset` integer: Starting position for pagination
  - `count` integer: Number of posts to return (max 100 per request)
  - `force_token` string, nullable: Force a specific token for testing (internal use only)

## Response `200`

Successful Response

- SearchPostsResponse: Response containing searched posts
  - `total` integer: Total number of posts matching the search
  - `offset` integer: Offset used for this request
  - `count` integer: Number of posts returned
  - `has_next` boolean: Whether there are more posts to fetch
  - `credits_used` number: Credits used for this request
  - `results` object[]: List of posts

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dataforb2b/apis/dataforb2b-api.md) · [All operations](https://skmtc.dev/dataforb2b/apis/dataforb2b-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dataforb2b/apis/dataforb2b-api/revisions/24ea79caa1a1?raw)
