GET/desearch/facebook/profile/{profile_id}/posts

    Retrieve Facebook Profile/Page Posts

    Retrieve normalized public posts for a Facebook profile/page. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Retrieve Facebook Profile/Page Posts when your application needs search-grounded AI results without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. Retrieve public Facebook posts for a profile or page using the required profile_id string. This identifier can be the name from a facebook.com/<name> profile or page URL, or a numeric ID; a page name can differ from the brand name. Limit each page with optional count, an integer between 1 and 100 whose default is 20. The limit is a maximum, so a smaller list is valid. Leave cursor out of the first profile-posts request. A following page is indicated by the x-desearch-next-cursor response header: send its token back verbatim in cursor, on this profile-posts endpoint for the same profile identifier. The final response has no next-cursor header. Only a cursor issued for this route and target is valid, and its lifetime is 24 hours. Incorrect, expired, or cross-target values return an uncharged 422 response before any search executes. The success schema permits a FacebookPost array as well as an object body. A post's nullable author is typed as FacebookProfile, which can describe the page through nullable strings name, username, id, url, and avatar. Other nullable author strings include bio, category, website, and address. The public contact fields email and phone are described as available when the page shows them; their schema allows null. verified is a nullable boolean, while the author's followers and likes are nullable integers. Post-level engagement uses a separate nullable stats object. There, reactionCount combines all reaction types, alongside nullable integer shareCount, viewCount, and commentCount. If Facebook exposes a breakdown, the nullable reactions object has integer counts under reaction names such as like, love, care, haha, wow, sad, and anger. For attached media, the media array references FacebookMedia: height and width are nullable integer properties, and thumbnail, url, and type are nullable strings. Post identity and text use id, url, text, and createTime, each permitting a string or null, while hashtags is an array containing strings. The shared post schema also defines ad-specific fields: linkUrl refers to the ad landing URL while url remains the post or Library URL; headline, linkDescription, cta, endDate, and active are optional and nullable. Their presence is not guaranteed by a profile-posts request. For accounting, successful billable requests return the headers X-Desearch-Cost-Usd, X-Desearch-Usage-Count, X-Desearch-Service, and X-Desearch-Currency. Optional body fields cost_usd, usage_count, service, and currency apply to JSON objects; arrays retain their post-list form with billing recorded in headers. Keyword or hashtag ad discovery is available through Facebook Ad Library records, and the Facebook API overview explains the related routes. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /desearch/facebook/profile/{profile_id}/posts with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Path Parameters

    profile_idstringrequired

    The name from the profile or page link (facebook.com/<name>, e.g. NASA) or its numeric id. A brand's page name can differ from its brand (Decrypt is DecryptMediaOfficial).

    Query Parameters

    countinteger

    Maximum number of items to return. A page may hold fewer.

    Default: 20

    cursorstring

    Opaque pagination cursor. Omit it for the first page. For the next page, send the `x-desearch-next-cursor` response header from the previous page back unchanged, on the same route with the same target (username, tag, post, or search query). A cursor is valid for 24 hours. Any other value, including an expired cursor or one issued by a different route or target, returns 422 and is not charged.

    Responses

    200A list of normalized Facebook posts.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    404The profile or page does not exist or could not be read (detail "The profile or page could not be read…"). Not charged.
    422Validation Error, or the `cursor` is not one this route issued for this target, or it has expired. An invalid cursor is rejected before any search runs and is not charged.
    429Too Many Requests
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/desearch/facebook/profile/facebook/posts" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /desearch/facebook/profile/{profile_id}/posts
    ResponseSchema
    [
      {
        "id": "1525856912919657",
        "url": "https://www.facebook.com/facebook/posts/1525856912919657",
        "text": "Post text",
        "createTime": "2026-05-01T10:00:00Z",
        "author": {
          "id": "123456789",
          "username": "facebook",
          "name": "Desearch AI",
          "url": "https://www.facebook.com/facebook",
          "avatar": "https://example.com/avatar.jpg",
          "verified": true,
          "bio": "Public search API",
          "category": "Software",
          "followers": 50000,
          "likes": 12000,
          "email": "hello@example.com",
          "phone": "+995 32 2 00 00 00",
          "website": "https://example.com",
          "address": "Tbilisi, Georgia"
        },
        "stats": {
          "reactionCount": 1200,
          "reactions": {
            "anger": 5,
            "haha": 30,
            "like": 1000,
            "love": 150,
            "sad": 5,
            "wow": 10
          },
          "commentCount": 80,
          "shareCount": 24,
          "viewCount": 10000
        },
        "media": [
          {
            "type": "photo",
            "url": "https://example.com/photo.jpg",
            "thumbnail": "https://example.com/thumb.jpg",
            "width": 1200,
            "height": 630
          }
        ],
        "hashtags": [
          "string"
        ],
        "linkUrl": "string",
        "cta": "string",
        "headline": "string",
        "linkDescription": "string",
        "endDate": "string",
        "active": true,
        "platforms": [
          "string"
        ]
      }
    ]
    Status codes200301304401404422429500