Facebook / Search

Search All

Search Facebook's All tab. Each parsed item costs 4 credits.

01

Request

POST /facebook/search/all with your bearer API key.

queryRequired search text.
recentOptional boolean: newest results first.
location_idOptional numeric Facebook location ID.
start_dateFirst posted date, inclusive, YYYY-MM-DD. Send with end_date.
end_dateLast posted date, inclusive, YYYY-MM-DD. Send with start_date.
cursorOmit initially. Send data.pagination.cursor unchanged with the same query and filters to continue.
▸ ▾ request {}
{"query":"gardening","recent":true}

Each call returns one page. Stop when data.pagination.has_next_page is false. Billing is 4 times the total number of items in posts, users, pages, groups, videos, events and marketplace. Nothing in data.results is charged.

You need at least 1 credit before a search starts; an empty balance returns 402. Empty results cost nothing. If the page costs more than your remaining balance, you receive the full page and only the remaining credits are deducted. cost shows the actual charge. Failed fetches are not charged.

02

Response sample

▸ ▾ response {} — illustrative; native card and media details shortened
{
  "cost": 24,
  "created_at": 1790812800,
  "request_duration": 310,
  "parse_duration": 1,
  "data": {
    "posts": [
      {
        "id": "100000000000101",
        "url": "https://www.facebook.com/communityupdates/posts/100000000000101/",
        "created_at": 1790812800,
        "text": "An update from our community.",
        "author": {
          "id": "100000000000001",
          "name": "Community Updates",
          "url": "https://www.facebook.com/communityupdates/"
        },
        "group": {
          "id": null,
          "name": null,
          "url": null
        },
        "engagement": {
          "reaction_count": 10,
          "comment_count": 3,
          "share_count": 1
        },
        "media": [],
        "shared_post": null
      }
    ],
    "users": [],
    "pages": [
      {
        "id": "100000000000001",
        "type": "User",
        "name": "Community Updates",
        "url": "https://www.facebook.com/communityupdates/",
        "profile_picture_url": null,
        "is_verified": false,
        "summary": "Community · 2.1K followers",
        "subtitle": null,
        "description_snippets": [
          "News from our community."
        ],
        "join_state": null,
        "has_membership_questions": null
      }
    ],
    "groups": [
      {
        "id": "100000000000003",
        "type": "Group",
        "name": "Community Gardeners",
        "url": "https://www.facebook.com/groups/100000000000003/",
        "profile_picture_url": null,
        "is_verified": null,
        "summary": "Public · 1.2K members · 3 posts a day",
        "subtitle": null,
        "description_snippets": [
          "Share gardening tips with your neighbours."
        ],
        "join_state": "CAN_JOIN",
        "has_membership_questions": false
      }
    ],
    "videos": [
      {
        "id": "100000000000102",
        "url": "https://www.facebook.com/reel/100000000000201/",
        "created_at": 1790812800,
        "text": "A quick look around our community garden.",
        "author": {
          "id": "100000000000001",
          "name": "Community Updates",
          "url": "https://www.facebook.com/communityupdates/"
        },
        "group": {
          "id": null,
          "name": null,
          "url": null
        },
        "engagement": {
          "reaction_count": 10,
          "comment_count": 3,
          "share_count": 1
        },
        "media": [
          {
            "type": "StoryAttachmentUnifiedLightweightVideoStyleRenderer",
            "id": "100000000000201",
            "image_url": null,
            "url": "https://www.facebook.com/reel/100000000000201/",
            "caption": null,
            "album_images": [],
            "details": {}
          }
        ],
        "shared_post": null
      }
    ],
    "events": [
      {
        "id": "100000000000004",
        "type": "Event",
        "name": "Community Garden Day",
        "url": "https://www.facebook.com/events/100000000000004/",
        "profile_picture_url": null,
        "is_verified": null,
        "summary": "12 people going · Community Gardens",
        "subtitle": "SAT AT 10:00 +01",
        "description_snippets": [],
        "join_state": null,
        "has_membership_questions": null
      }
    ],
    "marketplace": [
      {
        "id": "100000000000005",
        "title": "Garden planter",
        "url": "https://www.facebook.com/marketplace/item/100000000000005/",
        "created_at": 1790812800,
        "price": {
          "formatted_amount": "€25",
          "amount": "25.00"
        },
        "image": null,
        "location": {
          "reverse_geocode": {
            "city": "Berlin",
            "state": "BE"
          }
        },
        "seller": {
          "__typename": "User",
          "id": "100000000000001",
          "name": "Community Updates"
        },
        "is_sold": false,
        "is_pending": false,
        "delivery_types": [
          "IN_PERSON"
        ]
      }
    ],
    "results": [
      {
        "role": "TOP_PUBLIC_POSTS",
        "type": "SearchRichPostRenderingStrategy",
        "data": {
          "__typename": "SearchRichPostRenderingStrategy",
          "view_model": {
            "click_model": {
              "story": {
                "post_id": "100000000000101"
              }
            }
          }
        }
      }
    ],
    "pagination": {
      "has_next_page": true,
      "cursor": "<opaque cursor>"
    }
  }
}

03

Fields

Responses include cost, created_at, request_duration and parse_duration alongside data. Missing optional fields are null.

data.posts []

idtextFacebook post ID.
urltextPost permalink.
texttextPost body, or null.
created_atnumberUnix timestamp in seconds.
authorobjectAuthor ID, name and profile URL.
groupobjectGroup ID, name and URL, when the post belongs to a group.
engagementobjectReaction, comment and share counts.
mediaobject[]Image, video, album and link attachment details.
shared_postobjectEmbedded original when available, or null.

Dedicated video results, including Reels, appear in data.videos with the same fields as posts. Ordinary posts with video attachments stay in data.posts. Each video costs 4 credits.

data.videos []

idtextFacebook post ID.
urltextPost permalink.
texttextPost body, or null.
created_atnumberUnix timestamp in seconds.
authorobjectAuthor ID, name and profile URL.
groupobjectGroup ID, name and URL, when the post belongs to a group.
engagementobjectReaction, comment and share counts.
mediaobject[]Image, video, album and link attachment details.
shared_postobjectEmbedded original when available, or null.

data.users []

idtextProfile ID.
nametextDisplay name.
urltextProfile URL.
profile_picture_urltextProfile picture URL, or null.
is_verifiedbooleanVerification mark when supplied.

data.pages []

idtextProfile ID.
typetextNative profile type. Page results can have type User.
nametextDisplay name.
urltextProfile URL.
profile_picture_urltextProfile image URL when supplied.
is_verifiedbooleanVerification mark when supplied.
summarytextDisplayed category, membership, activity or follower details. Rounded counts stay as displayed.
subtitletextAdditional displayed details, including event date and time text when supplied.
description_snippetstext[]Description fragments supplied by Facebook.
join_statetextAvailable group join action, or null.
has_membership_questionsbooleanWhether joining requires answers, or null.

data.groups []

idtextProfile ID.
typetextNative profile type. Page results can have type User.
nametextDisplay name.
urltextProfile URL.
profile_picture_urltextProfile image URL when supplied.
is_verifiedbooleanVerification mark when supplied.
summarytextDisplayed category, membership, activity or follower details. Rounded counts stay as displayed.
subtitletextAdditional displayed details, including event date and time text when supplied.
description_snippetstext[]Description fragments supplied by Facebook.
join_statetextAvailable group join action, or null.
has_membership_questionsbooleanWhether joining requires answers, or null.

Event dates and times are kept as Facebook's displayed text in subtitle.

data.events []

idtextProfile ID.
typetextNative profile type. Page results can have type User.
nametextDisplay name.
urltextProfile URL.
profile_picture_urltextProfile image URL when supplied.
is_verifiedbooleanVerification mark when supplied.
summarytextDisplayed category, membership, activity or follower details. Rounded counts stay as displayed.
subtitletextAdditional displayed details, including event date and time text when supplied.
description_snippetstext[]Description fragments supplied by Facebook.
join_statetextAvailable group join action, or null.
has_membership_questionsbooleanWhether joining requires answers, or null.

data.marketplace []

idtextListing ID.
titletextListing title.
urltextListing URL.
created_atnumberCreation timestamp in seconds, when supplied.
priceobjectNative price details, preserving the displayed amount and formatting.
imageobjectPrimary listing image when supplied.
locationobjectNative location details.
sellerobjectSeller details supplied by Facebook.
is_soldbooleanSold flag when supplied.
is_pendingbooleanPending flag when supplied.
delivery_typestext[]Available delivery methods.

data.results []

roletextFacebook result role.
typetextFacebook card type.
dataobjectRemaining native cards in their original order. Raw copies of parsed items may also appear here; nothing in results is billed.

data.pagination {}

has_next_pagebooleanWhether another page is available.
cursortextOpaque continuation; null at the end.