본문으로 건너뛰기

Facebook 프로필 게시물 조회 API (V1) ​

GET
API 상태
정상 사용 가능 일부 사용 가능 대부분 사용 불가 데이터 없음
API 상태를 불러오는 중…

Facebook 프로필 ID로 공개 게시물을 조회합니다. 커서 기반 페이지네이션으로 특정 프로필의 공개 게시물 기록을 보거나 다음 페이지를 조회할 수 있습니다.

요청 파라미터 ​

이름 위치 유형 필수 기본값 설명
token query string 예 - API 접근 인증에 사용하는 사용자 보안 토큰입니다.
profileId query string 예 - Facebook 프로필의 고유 ID입니다.
cursor query string 아니요 다음 결과 묶음을 가져오기 위한 페이지네이션 커서입니다.

코드 예제 ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE'
text
JustOneAPI의 "프로필 게시물 조회 (V1)" API를 사용하고 싶습니다.
기본 URL: https://api.justoneapi.com.
API 경로: /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
API 주소: BASE_URL + /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
HTTP 메서드: GET
인증: URL에 "token" 쿼리 파라미터를 추가하세요.
OpenAPI 정의: https://docs.justoneapi.com/openapi/facebook/get-profile-posts-v1-ko.json

요청 파라미터:
- token (query): API 접근 인증에 사용하는 사용자 보안 토큰입니다. (필수)
- profileId (query): Facebook 프로필의 고유 ID입니다. (필수)
- cursor (query): 다음 결과 묶음을 가져오기 위한 페이지네이션 커서입니다.

응답 형식: 실제 Content-Type에 따라 JSON 또는 텍스트를 안전하게 처리하세요.

응답 처리 및 오류 코드
1. 응답 본문의 "code" 필드에서 처리 결과를 확인하세요. 0은 성공을 뜻합니다.
2. 권장 요청 제한 시간은 120초입니다. 120초가 너무 길다면 최소 60초로 설정하세요. 일부 요청은 응답을 받기 전에 시간 초과될 수 있습니다.
3. API 결과 코드
   - 0: 성공
   - 100: 유효하지 않거나 비활성화된 토큰
   - 301: 데이터 수집에 실패했습니다. 다시 시도해 주세요.
   - 302: 호출 빈도 제한 초과
   - 303: 일일 호출 한도 초과
   - 400: 잘못된 파라미터
   - 500: 서버 내부 오류
   - 600: 호출 권한 없음
   - 601: 계정 잔액 부족
   - 602: API 토큰의 누적 예산 한도 초과
4. 601은 공유 계정 잔액이 부족하다는 뜻입니다. 602는 현재 API 토큰의 누적 예산 한도에 도달했다는 뜻입니다. 토큰 예산을 설정해도 공유 계정 잔액은 별도로 배정되지 않습니다.

제가 사용하는 프로그래밍 언어로 이 API를 호출하고 응답을 처리하는 스크립트를 작성해 주세요.
python
import requests

BASE_URL = "https://api.justoneapi.com"  # OpenAPI 서버 설정에서 제공

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
const BASE_URL = "https://api.justoneapi.com"; // OpenAPI 서버 설정에서 제공
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
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"; // OpenAPI 서버 설정에서 제공
        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
package main

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

const BASE_URL = "https://api.justoneapi.com" // OpenAPI 서버 설정에서 제공

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
$BASE_URL = 'https://api.justoneapi.com'; // OpenAPI 서버 설정에서 제공
$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;
}

응답 필드 ​

성공 응답(code = 0)의 주요 필드입니다.

게시물 및 페이지 번호필드 2개

data

첨부된 Facebook 프로필 게시물 및 계속 정보.

필드 유형 설명
results array 이 프로필에 대한 공개 게시물. 목록은 비어 있을 수 있습니다.
cursor string | null 같은 프로필의 다음 페이지를 요청할 때 반환된 값을 cursor 쿼리 파라미터에 그대로 전달하세요. null이면 다음 페이지를 조회할 값이 반환되지 않은 것입니다.
게시물 콘텐츠필드 9개

data.results[]

프로필에 대한 공개 게시물 하나.

필드 유형 설명
post_id string Facebook 게시물 식별자.
type string 반환된 기록의 유형. 검증된 결과는 post를 사용합니다.
url string Facebook 게시물의 공개 링크.
message string | null 게시물 메시지의 텍스트, 사용할 수 없을 경우 null.
message_rich string | null 반환된 형식화된 메시지 텍스트, 사용할 수 없을 때는 null입니다.
timestamp integer Unix 타임스탬프 형식의 초 단위로 표시된 게시물 발행 시간.
text_format_metadata - 게시물 텍스트 서식 메타데이터. 검증된 샘플은 null을 반환합니다.
was_detected_as_ai_generated - AI 생성 콘텐츠로 감지된 콘텐츠의 플랫폼 마커. 검증된 샘플은 null을 반환합니다.
was_self_disclosed_as_ai_generated - AI 생성 콘텐츠에 대한 작성자 공개 마커. 검증된 샘플은 null을 반환합니다.
참여도 및 반응필드 13개

data.results[]

필드 유형 설명
comments_count integer 게시물에 대한 보고된 댓글 수.
reactions_count integer 게시물에 대한 총 반응 수의 보고된 수.
reshare_count integer 게시물이 재공유된 횟수의 보고된 수.
reactions object 개별 반응 유형에 대한 보고된 수.
reactions.angry integer 화난 반응의 수.
reactions.care integer 걱정하는 반응의 수.
reactions.haha integer 웃는 반응의 수.
reactions.like integer 좋아하는 반응의 수.
reactions.love integer 사랑하는 반응의 수.
reactions.sad integer 슬픈 반응의 수.
reactions.wow integer 놀란 반응의 수.
comments_id string 이 게시물의 댓글 컨텍스트에 대한 보고된 식별자.
shares_id string 이 게시물의 공유 맥락에 대한 식별자 보고서.
게시물 작성자필드 14개

data.results[]

필드 유형 설명
author object 게시물의 주요 공개 작가.
author.id string Facebook 프로필 식별자.
author.name string 프로필의 공개 표시 이름.
author.url string Facebook 프로필의 공개 링크.
author.profile_picture_url string 이 작성자의 프로필 사진 URL이 반환되었습니다.
author.delegate_page_id string | null 위임된 작성자의 Facebook 페이지 식별자, 사용할 수 있을 때 제공됩니다.
authors array 게시물과 관련된 공개 작성자들.
authors[] object 게시물과 관련된 공개 작성자 하나.
authors[].id string Facebook 프로필 식별자.
authors[].name string 프로필의 공개 표시 이름.
authors[].url string Facebook 프로필의 공개 링크.
authors[].profile_picture_url string 이 작성자의 프로필 사진 URL이 반환되었습니다.
authors[].delegate_page_id string | null 위임된 작성자의 Facebook 페이지 식별자, 사용할 수 있을 때 제공됩니다.
author_title - 게시물 작성자의 직함 정보입니다. 확인한 응답 샘플에서는 null이 반환됩니다.
이미지 및 동영상필드 21개

data.results[]

필드 유형 설명
image object | null 단일 이미지 첨부 파일의 세부 정보, 사용할 수 없을 때는 null.
image.uri string 첨부된 이미지의 URL입니다.
image.height integer 첨부된 이미지의 픽셀 단위 높이.
image.width integer 첨부된 이미지의 너비(픽셀).
image.id string 첨부된 이미지의 식별자.
video string | null 첨부된 비디오에 대한 Facebook 링크, 사용할 수 없을 때는 null입니다.
video_view_count integer | null 보고된 비디오 시청 수, 사용할 수 없을 때는 null.
album_preview array | null 게시물 앨범 내 첨부 파일 미리보기, 사용할 수 없을 경우 null.
album_preview[] object 사진이나 비디오와 같은 미리보기 첨부파일 하나.
album_preview[].type string 첨부 파일 미리보기 유형. 검증된 미리보기에는 사진과 비디오가 포함됩니다.
album_preview[].image_file_uri string 미리보기 이미지의 URL.
album_preview[].url string 첨부 파일 미리보기로 이동할 수 있는 공개 Facebook 링크.
album_preview[].id string 첨부 파일 미리보기 식별자.
album_preview[].video_sd_file string 이 미리보기에 대한 표준 화질 비디오 파일 URL이 반환되었습니다.
album_preview[].video_hd_file string 이 미리보기에 대한 고화질 비디오 파일 URL이 반환됩니다.
album_preview[].video_id string 미리보기로 반환된 Facebook 비디오 식별자.
video_files object | null 게시물과 관련된 비디오 파일 링크, 사용할 수 없을 경우 null.
video_files.video_sd_file string 게시물에 대한 표준 화질 비디오 파일 URL이 반환되었습니다.
video_files.video_hd_file string 게시물에 대한 고화질 비디오 파일 URL이 반환됩니다.
video_thumbnail string | null 첨부된 이미지의 비디오 썸네일 URL, 사용할 수 없을 경우 null.
images_count integer | null 게시물에 대한 보고된 이미지 수, 사용할 수 없을 때는 null.
첨부된 게시물 및 링크필드 18개

data.results[]

필드 유형 설명
external_url string | null 게시물에 첨부된 외부 링크, 사용할 수 없을 때는 null입니다.
attached_event - 이벤트 첨부 정보. 검증된 샘플은 null을 반환합니다.
attached_group - 그룹 첨부 정보. 검증된 샘플은 null을 반환합니다.
attached_post object | null 이 게시물에 첨부된 Facebook 게시물의 세부 정보, 사용할 수 없을 때는 null입니다.
attached_post.post_id string 첨부된 Facebook 게시물의 식별자.
attached_post.url string 첨부된 Facebook 게시물의 공개 링크.
attached_post.timestamp - 첨부된 게시물의 게시 시간. 검증된 샘플은 null을 반환합니다.
attached_post.message string | null 첨부된 게시물의 텍스트, 사용할 수 없을 때는 null.
attached_post.photo_url - 첨부된 게시물의 사진 링크. 검증된 샘플은 null을 반환합니다.
attached_post.author object 첨부된 게시물에 대한 공개 작성자 정보가 반환되었습니다.
attached_post.author.id string Facebook 프로필 식별자.
attached_post.author.name string 프로필의 공개 표시 이름.
attached_post.author.url string Facebook 프로필의 공개 링크.
attached_post.video_url string | null 첨부된 게시물의 비디오 링크, 사용할 수 없을 경우 null.
attached_post.album_url - 첨부된 게시물의 앨범 링크. 검증된 샘플은 null을 반환합니다.
attached_post_url string | null 첨부된 게시물의 링크, 사용할 수 없을 경우 null.
associated_group_id - 게시물과 관련된 그룹의 식별자 정보. 검증된 샘플은 null을 반환합니다.
associated_group - 게시물과 관련된 Facebook 그룹에 대한 정보. 검증된 샘플은 null을 반환합니다.
강조된 댓글필드 13개

data.results[]

필드 유형 설명
top_comments array 게시물과 함께 반환된 강조된 댓글. 목록은 비어 있을 수 있습니다.
top_comments[] object 게시물과 관련된 강조된 코멘트 하나.
top_comments[].type string 댓글 기록 유형. 검증된 기록은 top_comment을 사용합니다.
top_comments[].id string 강조된 댓글의 식별자.
top_comments[].legacy_fb_id string 댓글의 레거시 Facebook 식별자.
top_comments[].text string 강조된 댓글의 텍스트.
top_comments[].author object 댓글에 대한 공개 작성자 정보가 반환되었습니다.
top_comments[].author.id string Facebook 프로필 식별자.
top_comments[].author.name string 프로필의 공개 표시 이름.
top_comments[].author.url string Facebook 프로필의 공개 링크.
top_comments[].author.gender string 댓글 작성자의 성별 라벨 정보.
top_comments[].author.profile_image_url string 댓글 작성자의 프로필 이미지 URL이 반환되었습니다.
top_comments[].created_time integer 댓글 게시 시간, Unix 타임스탬프(초) 형태.

응답 예시 ​

응답 예시를 불러오는 중…