---
title: "Facebook Get Profile Posts API (V1)"
description: "Retrieves public posts for a Facebook profile ID with cursor pagination. Use it to browse a known profile's public posting history or continue through subsequent post pages."
aiUsagePrompt: true
---

# Facebook Get Profile Posts API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")'
  :summary='JSON.parse("\"Get Profile Posts (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/facebook/get-profile-posts-v1-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"User security token for API access authentication.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"profileId\",\"in\":\"query\",\"description\":\"The unique Facebook profile ID.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"cursor\",\"in\":\"query\",\"description\":\"Pagination cursor for fetching the next set of results.\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Public Facebook profile posts and continuation information.\",\"properties\":{\"results\":{\"type\":\"array\",\"description\":\"Public posts returned for this profile. The list can be empty.\",\"items\":{\"type\":\"object\",\"description\":\"One public post returned for the profile.\",\"properties\":{\"post_id\":{\"type\":\"string\",\"description\":\"Facebook post identifier.\"},\"type\":{\"type\":\"string\",\"description\":\"Type of record returned. The verified results use post.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the Facebook post.\"},\"message\":{\"type\":[\"string\",\"null\"],\"description\":\"Text of the post message, or null when unavailable.\"},\"message_rich\":{\"type\":[\"string\",\"null\"],\"description\":\"Formatted message text as returned, or null when unavailable.\"},\"timestamp\":{\"type\":\"integer\",\"description\":\"Post publication time as a Unix timestamp in seconds.\"},\"comments_count\":{\"type\":\"integer\",\"description\":\"Reported comment count for the post.\"},\"reactions_count\":{\"type\":\"integer\",\"description\":\"Reported total number of reactions to the post.\"},\"reshare_count\":{\"type\":\"integer\",\"description\":\"Reported number of times the post was reshared.\"},\"reactions\":{\"type\":\"object\",\"description\":\"Reported counts for individual reaction types.\",\"properties\":{\"angry\":{\"type\":\"integer\",\"description\":\"Number of Angry reactions.\"},\"care\":{\"type\":\"integer\",\"description\":\"Number of Care reactions.\"},\"haha\":{\"type\":\"integer\",\"description\":\"Number of Haha reactions.\"},\"like\":{\"type\":\"integer\",\"description\":\"Number of Like reactions.\"},\"love\":{\"type\":\"integer\",\"description\":\"Number of Love reactions.\"},\"sad\":{\"type\":\"integer\",\"description\":\"Number of Sad reactions.\"},\"wow\":{\"type\":\"integer\",\"description\":\"Number of Wow reactions.\"}}},\"author\":{\"type\":\"object\",\"description\":\"Primary public author of the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook profile identifier.\"},\"name\":{\"type\":\"string\",\"description\":\"Public display name of the profile.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the Facebook profile.\"},\"profile_picture_url\":{\"type\":\"string\",\"description\":\"Profile picture URL returned for this author.\"},\"delegate_page_id\":{\"type\":[\"string\",\"null\"],\"description\":\"Facebook page identifier reported for the delegated author, when available.\"}}},\"authors\":{\"type\":\"array\",\"description\":\"Public authors associated with the post.\",\"items\":{\"type\":\"object\",\"description\":\"One public author associated with the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook profile identifier.\"},\"name\":{\"type\":\"string\",\"description\":\"Public display name of the profile.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the Facebook profile.\"},\"profile_picture_url\":{\"type\":\"string\",\"description\":\"Profile picture URL returned for this author.\"},\"delegate_page_id\":{\"type\":[\"string\",\"null\"],\"description\":\"Facebook page identifier reported for the delegated author, when available.\"}}}},\"author_title\":{\"description\":\"Title information for the post author. The verified samples return null.\"},\"image\":{\"type\":[\"object\",\"null\"],\"description\":\"Single-image attachment details, or null when unavailable.\",\"properties\":{\"uri\":{\"type\":\"string\",\"description\":\"URL of the attached image.\"},\"height\":{\"type\":\"integer\",\"description\":\"Height of the attached image in pixels.\"},\"width\":{\"type\":\"integer\",\"description\":\"Width of the attached image in pixels.\"},\"id\":{\"type\":\"string\",\"description\":\"Identifier of the attached image.\"}}},\"video\":{\"type\":[\"string\",\"null\"],\"description\":\"Facebook link to the attached video, or null when unavailable.\"},\"video_view_count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Reported video view count, or null when unavailable.\"},\"album_preview\":{\"type\":[\"array\",\"null\"],\"description\":\"Preview of attachments in the post album, or null when unavailable.\",\"items\":{\"type\":\"object\",\"description\":\"One preview attachment, such as a photo or video.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Preview attachment type. The verified previews include photo and video.\"},\"image_file_uri\":{\"type\":\"string\",\"description\":\"URL of the preview image.\"},\"url\":{\"type\":\"string\",\"description\":\"Public Facebook link to the preview attachment.\"},\"id\":{\"type\":\"string\",\"description\":\"Preview attachment identifier.\"},\"video_sd_file\":{\"type\":\"string\",\"description\":\"Standard-definition video file URL returned for this preview.\"},\"video_hd_file\":{\"type\":\"string\",\"description\":\"High-definition video file URL returned for this preview.\"},\"video_id\":{\"type\":\"string\",\"description\":\"Facebook video identifier returned for the preview.\"}}}},\"video_files\":{\"type\":[\"object\",\"null\"],\"description\":\"Video file links associated with the post, or null when unavailable.\",\"properties\":{\"video_sd_file\":{\"type\":\"string\",\"description\":\"Standard-definition video file URL returned for the post.\"},\"video_hd_file\":{\"type\":\"string\",\"description\":\"High-definition video file URL returned for the post.\"}}},\"video_thumbnail\":{\"type\":[\"string\",\"null\"],\"description\":\"Video thumbnail URL, or null when unavailable.\"},\"external_url\":{\"type\":[\"string\",\"null\"],\"description\":\"External link attached to the post, or null when unavailable.\"},\"attached_event\":{\"description\":\"Event attachment information. The verified samples return null.\"},\"attached_group\":{\"description\":\"Group attachment information. The verified samples return null.\"},\"attached_post\":{\"type\":[\"object\",\"null\"],\"description\":\"Details of a Facebook post attached to this post, or null when unavailable.\",\"properties\":{\"post_id\":{\"type\":\"string\",\"description\":\"Identifier of the attached Facebook post.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the attached Facebook post.\"},\"timestamp\":{\"description\":\"Publication timestamp of the attached post. The verified samples return null.\"},\"message\":{\"type\":[\"string\",\"null\"],\"description\":\"Text of the attached post, or null when unavailable.\"},\"photo_url\":{\"description\":\"Photo link for the attached post. The verified samples return null.\"},\"author\":{\"type\":\"object\",\"description\":\"Public author details returned for the attached post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook profile identifier.\"},\"name\":{\"type\":\"string\",\"description\":\"Public display name of the profile.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the Facebook profile.\"}}},\"video_url\":{\"type\":[\"string\",\"null\"],\"description\":\"Video link for the attached post, or null when unavailable.\"},\"album_url\":{\"description\":\"Album link for the attached post. The verified samples return null.\"}}},\"attached_post_url\":{\"type\":[\"string\",\"null\"],\"description\":\"Link to the attached post, or null when unavailable.\"},\"text_format_metadata\":{\"description\":\"Post text formatting metadata. The verified samples return null.\"},\"comments_id\":{\"type\":\"string\",\"description\":\"Identifier reported for the comment context of this post.\"},\"shares_id\":{\"type\":\"string\",\"description\":\"Identifier reported for the sharing context of this post.\"},\"associated_group_id\":{\"description\":\"Identifier information for a group associated with the post. The verified samples return null.\"},\"associated_group\":{\"description\":\"Information about a Facebook group associated with the post. The verified samples return null.\"},\"images_count\":{\"type\":[\"integer\",\"null\"],\"description\":\"Reported image count for the post, or null when unavailable.\"},\"top_comments\":{\"type\":\"array\",\"description\":\"Highlighted comments returned with the post. The list can be empty.\",\"items\":{\"type\":\"object\",\"description\":\"One highlighted comment returned with the post.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Comment record type. The verified records use top_comment.\"},\"id\":{\"type\":\"string\",\"description\":\"Identifier of the highlighted comment.\"},\"legacy_fb_id\":{\"type\":\"string\",\"description\":\"Legacy Facebook identifier of the comment.\"},\"text\":{\"type\":\"string\",\"description\":\"Text of the highlighted comment.\"},\"author\":{\"type\":\"object\",\"description\":\"Public author information returned for the comment.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook profile identifier.\"},\"name\":{\"type\":\"string\",\"description\":\"Public display name of the profile.\"},\"url\":{\"type\":\"string\",\"description\":\"Public link to the Facebook profile.\"},\"gender\":{\"type\":\"string\",\"description\":\"Gender label reported for the comment author.\"},\"profile_image_url\":{\"type\":\"string\",\"description\":\"Profile image URL returned for the comment author.\"}}},\"created_time\":{\"type\":\"integer\",\"description\":\"Comment publication time as a Unix timestamp in seconds.\"}}}},\"was_detected_as_ai_generated\":{\"description\":\"Platform marker for content detected as AI-generated. The verified samples return null.\"},\"was_self_disclosed_as_ai_generated\":{\"description\":\"Author disclosure marker for AI-generated content. The verified samples return null.\"}}}},\"cursor\":{\"type\":[\"string\",\"null\"],\"description\":\"Pass a returned cursor unchanged as the cursor query parameter for the same profile. Null means no continuation was returned.\"}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")' />

<p>Retrieves public posts for a Facebook profile ID with cursor pagination. Use it to browse a known profile's public posting history or continue through subsequent post pages.</p>

## Parameters

<div class="api-doc-table api-doc-table--params">

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | User security token for API access authentication. |
| <code>profileId</code> | query | <code>string</code> | Yes | - | The unique Facebook profile ID. |
| <code>cursor</code> | query | <code>string</code> | No | <code></code> | Pagination cursor for fetching the next set of results. |

</div>

## Code Samples

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Get Profile Posts (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
API Endpoint: BASE_URL + /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/facebook/get-profile-posts-v1-en.json

Parameters:
- token (query): User security token for API access authentication. (Required)
- profileId (query): The unique Facebook profile ID. (Required)
- cursor (query): Pagination cursor for fetching the next set of results.

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/facebook/get-profile-posts-v1-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

Key fields in a successful response (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Public Facebook profile posts and continuation information. |
| <code>data.results</code> | <code>array</code> | Public posts returned for this profile. The list can be empty. |
| <code>data.results[]</code> | <code>object</code> | One public post returned for the profile. |
| <code>data.results[].post_id</code> | <code>string</code> | Facebook post identifier. |
| <code>data.results[].type</code> | <code>string</code> | Type of record returned. The verified results use post. |
| <code>data.results[].url</code> | <code>string</code> | Public link to the Facebook post. |
| <code>data.results[].message</code> | <code>string &#124; null</code> | Text of the post message, or null when unavailable. |
| <code>data.results[].message_rich</code> | <code>string &#124; null</code> | Formatted message text as returned, or null when unavailable. |
| <code>data.results[].timestamp</code> | <code>integer</code> | Post publication time as a Unix timestamp in seconds. |
| <code>data.results[].comments_count</code> | <code>integer</code> | Reported comment count for the post. |
| <code>data.results[].reactions_count</code> | <code>integer</code> | Reported total number of reactions to the post. |
| <code>data.results[].reshare_count</code> | <code>integer</code> | Reported number of times the post was reshared. |
| <code>data.results[].reactions</code> | <code>object</code> | Reported counts for individual reaction types. |
| <code>data.results[].reactions.angry</code> | <code>integer</code> | Number of Angry reactions. |
| <code>data.results[].reactions.care</code> | <code>integer</code> | Number of Care reactions. |
| <code>data.results[].reactions.haha</code> | <code>integer</code> | Number of Haha reactions. |
| <code>data.results[].reactions.like</code> | <code>integer</code> | Number of Like reactions. |
| <code>data.results[].reactions.love</code> | <code>integer</code> | Number of Love reactions. |
| <code>data.results[].reactions.sad</code> | <code>integer</code> | Number of Sad reactions. |
| <code>data.results[].reactions.wow</code> | <code>integer</code> | Number of Wow reactions. |
| <code>data.results[].author</code> | <code>object</code> | Primary public author of the post. |
| <code>data.results[].author.id</code> | <code>string</code> | Facebook profile identifier. |
| <code>data.results[].author.name</code> | <code>string</code> | Public display name of the profile. |
| <code>data.results[].author.url</code> | <code>string</code> | Public link to the Facebook profile. |
| <code>data.results[].author.profile_picture_url</code> | <code>string</code> | Profile picture URL returned for this author. |
| <code>data.results[].author.delegate_page_id</code> | <code>string &#124; null</code> | Facebook page identifier reported for the delegated author, when available. |
| <code>data.results[].authors</code> | <code>array</code> | Public authors associated with the post. |
| <code>data.results[].authors[]</code> | <code>object</code> | One public author associated with the post. |
| <code>data.results[].authors[].id</code> | <code>string</code> | Facebook profile identifier. |
| <code>data.results[].authors[].name</code> | <code>string</code> | Public display name of the profile. |
| <code>data.results[].authors[].url</code> | <code>string</code> | Public link to the Facebook profile. |
| <code>data.results[].authors[].profile_picture_url</code> | <code>string</code> | Profile picture URL returned for this author. |
| <code>data.results[].authors[].delegate_page_id</code> | <code>string &#124; null</code> | Facebook page identifier reported for the delegated author, when available. |
| <code>data.results[].author_title</code> | - | Title information for the post author. The verified samples return null. |
| <code>data.results[].image</code> | <code>object &#124; null</code> | Single-image attachment details, or null when unavailable. |
| <code>data.results[].image.uri</code> | <code>string</code> | URL of the attached image. |
| <code>data.results[].image.height</code> | <code>integer</code> | Height of the attached image in pixels. |
| <code>data.results[].image.width</code> | <code>integer</code> | Width of the attached image in pixels. |
| <code>data.results[].image.id</code> | <code>string</code> | Identifier of the attached image. |
| <code>data.results[].video</code> | <code>string &#124; null</code> | Facebook link to the attached video, or null when unavailable. |
| <code>data.results[].video_view_count</code> | <code>integer &#124; null</code> | Reported video view count, or null when unavailable. |
| <code>data.results[].album_preview</code> | <code>array &#124; null</code> | Preview of attachments in the post album, or null when unavailable. |
| <code>data.results[].album_preview[]</code> | <code>object</code> | One preview attachment, such as a photo or video. |
| <code>data.results[].album_preview[].type</code> | <code>string</code> | Preview attachment type. The verified previews include photo and video. |
| <code>data.results[].album_preview[].image_file_uri</code> | <code>string</code> | URL of the preview image. |
| <code>data.results[].album_preview[].url</code> | <code>string</code> | Public Facebook link to the preview attachment. |
| <code>data.results[].album_preview[].id</code> | <code>string</code> | Preview attachment identifier. |
| <code>data.results[].album_preview[].video_sd_file</code> | <code>string</code> | Standard-definition video file URL returned for this preview. |
| <code>data.results[].album_preview[].video_hd_file</code> | <code>string</code> | High-definition video file URL returned for this preview. |
| <code>data.results[].album_preview[].video_id</code> | <code>string</code> | Facebook video identifier returned for the preview. |
| <code>data.results[].video_files</code> | <code>object &#124; null</code> | Video file links associated with the post, or null when unavailable. |
| <code>data.results[].video_files.video_sd_file</code> | <code>string</code> | Standard-definition video file URL returned for the post. |
| <code>data.results[].video_files.video_hd_file</code> | <code>string</code> | High-definition video file URL returned for the post. |
| <code>data.results[].video_thumbnail</code> | <code>string &#124; null</code> | Video thumbnail URL, or null when unavailable. |
| <code>data.results[].external_url</code> | <code>string &#124; null</code> | External link attached to the post, or null when unavailable. |
| <code>data.results[].attached_event</code> | - | Event attachment information. The verified samples return null. |
| <code>data.results[].attached_group</code> | - | Group attachment information. The verified samples return null. |
| <code>data.results[].attached_post</code> | <code>object &#124; null</code> | Details of a Facebook post attached to this post, or null when unavailable. |
| <code>data.results[].attached_post.post_id</code> | <code>string</code> | Identifier of the attached Facebook post. |
| <code>data.results[].attached_post.url</code> | <code>string</code> | Public link to the attached Facebook post. |
| <code>data.results[].attached_post.timestamp</code> | - | Publication timestamp of the attached post. The verified samples return null. |
| <code>data.results[].attached_post.message</code> | <code>string &#124; null</code> | Text of the attached post, or null when unavailable. |
| <code>data.results[].attached_post.photo_url</code> | - | Photo link for the attached post. The verified samples return null. |
| <code>data.results[].attached_post.author</code> | <code>object</code> | Public author details returned for the attached post. |
| <code>data.results[].attached_post.author.id</code> | <code>string</code> | Facebook profile identifier. |
| <code>data.results[].attached_post.author.name</code> | <code>string</code> | Public display name of the profile. |
| <code>data.results[].attached_post.author.url</code> | <code>string</code> | Public link to the Facebook profile. |
| <code>data.results[].attached_post.video_url</code> | <code>string &#124; null</code> | Video link for the attached post, or null when unavailable. |
| <code>data.results[].attached_post.album_url</code> | - | Album link for the attached post. The verified samples return null. |
| <code>data.results[].attached_post_url</code> | <code>string &#124; null</code> | Link to the attached post, or null when unavailable. |
| <code>data.results[].text_format_metadata</code> | - | Post text formatting metadata. The verified samples return null. |
| <code>data.results[].comments_id</code> | <code>string</code> | Identifier reported for the comment context of this post. |
| <code>data.results[].shares_id</code> | <code>string</code> | Identifier reported for the sharing context of this post. |
| <code>data.results[].associated_group_id</code> | - | Identifier information for a group associated with the post. The verified samples return null. |
| <code>data.results[].associated_group</code> | - | Information about a Facebook group associated with the post. The verified samples return null. |
| <code>data.results[].images_count</code> | <code>integer &#124; null</code> | Reported image count for the post, or null when unavailable. |
| <code>data.results[].top_comments</code> | <code>array</code> | Highlighted comments returned with the post. The list can be empty. |
| <code>data.results[].top_comments[]</code> | <code>object</code> | One highlighted comment returned with the post. |
| <code>data.results[].top_comments[].type</code> | <code>string</code> | Comment record type. The verified records use top_comment. |
| <code>data.results[].top_comments[].id</code> | <code>string</code> | Identifier of the highlighted comment. |
| <code>data.results[].top_comments[].legacy_fb_id</code> | <code>string</code> | Legacy Facebook identifier of the comment. |
| <code>data.results[].top_comments[].text</code> | <code>string</code> | Text of the highlighted comment. |
| <code>data.results[].top_comments[].author</code> | <code>object</code> | Public author information returned for the comment. |
| <code>data.results[].top_comments[].author.id</code> | <code>string</code> | Facebook profile identifier. |
| <code>data.results[].top_comments[].author.name</code> | <code>string</code> | Public display name of the profile. |
| <code>data.results[].top_comments[].author.url</code> | <code>string</code> | Public link to the Facebook profile. |
| <code>data.results[].top_comments[].author.gender</code> | <code>string</code> | Gender label reported for the comment author. |
| <code>data.results[].top_comments[].author.profile_image_url</code> | <code>string</code> | Profile image URL returned for the comment author. |
| <code>data.results[].top_comments[].created_time</code> | <code>integer</code> | Comment publication time as a Unix timestamp in seconds. |
| <code>data.results[].was_detected_as_ai_generated</code> | - | Platform marker for content detected as AI-generated. The verified samples return null. |
| <code>data.results[].was_self_disclosed_as_ai_generated</code> | - | Author disclosure marker for AI-generated content. The verified samples return null. |
| <code>data.cursor</code> | <code>string &#124; null</code> | Pass a returned cursor unchanged as the cursor query parameter for the same profile. Null means no continuation was returned. |

</div>

## Response Example

<ApiExampleSection :api='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")' />

