Social media5 min readBy Purrkey teamUpdated

How to fetch a Facebook post's text and engagement by URL

Fetch a single Facebook post by URL and get its text, author, canonical link, and likes, comments, shares, and views

On this page

You have 12 Facebook post URLs from competitor pages and need their text, author, timestamps, and engagement counts for a weekly social-content brief. The deliverable is a table with one row per URL, and the table feeds a decision about which posts to cite

No run has been executed for this guide. The table below is a design, and its values are placeholders showing the shape

Example input and the table design

Example input from the contract, replace it with one of your 12 URLs: https://www.facebook.com/reel/2166091230582141/

The working table has these columns from the tool output: authorName, text, createdUtc, likes, comments, shares, views, and url. Values here are placeholders showing the shape

authorNametextcreatedUtclikescommentssharesviewsurl
(placeholder)(placeholder)(placeholder)000nullhttps://www.facebook.com/reel/2166091230582141/

A row with no result is still part of the table. Record found as false and reason as not_found, then leave the post fields empty. The brief should not cite a post that has no result

Step 1: send one post URL

anyapi.facebook.post takes url, which is required and is the full Facebook post URL. Copy that URL from the post itself. Agents call it through POST /v1/runs with toolId anyapi.facebook.post

requireFields is optional. Omit it and routing is unchanged, with the cheapest source serving. Name output fields only when the request must return them. The enum includes authorVerified, feedbackId, reactions, videoId, videoUrl, and views

Naming fields can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. Fields you do not name are still returned whenever the serving source has them. A named field can still be absent on a post that genuinely lacks it

The limit sits here. A requireFields combination that no single source returns together is refused as invalid input, with no charge. Pick named fields only when the weekly brief needs them, and test one post before you run 12

Step 2: read the output fields that decide the brief

found is the first field to read. When it is true, data holds the post. When it is false, reason is present and says not_found; the contract calls a found: false answer a successful call, not an error

The table fields come from data:

  • data.authorName gives the display name of the page or profile that posted
  • data.text gives the post text
  • data.createdUtc is a UTC epoch timestamp in seconds. Multiply by 1000 for a JS Date in milliseconds
  • data.likes, data.comments, data.shares, and data.views give engagement counts
  • data.url gives the canonical Facebook URL of the post

data.views can be null when the source cannot report an exact count, for example when it gives only a rounded figure such as 14K. That null is a data limit, not a failed call. A null view count should not stop the rest of the row from entering the brief

For a reel or video post, data.id is not the id in the /reel/ URL; that id is videoId. The deliverable table uses url to identify the post, so keep the URL you submitted and the canonical URL beside it

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch Facebook post text and engagement for the 12 URLs below. Check the current inputs and price of anyapi.facebook.post before running anything. Call the tool once per URL. Return a table with authorName, text, createdUtc, likes, comments, shares, views, and url. For a row with found false and reason not_found, keep the row and leave the post fields empty. Do not invent values.

Replace this list with your 12 URLs. Example input from the contract:
https://www.facebook.com/reel/2166091230582141/

Estimated tool cost

Prices from the Purrkey catalog, read November 13, 2026. The catalog lists the unit as max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings, not settled charges

StepFormulaUnit pricePlanned quantityTotal
Single post lookupcalls x max price$0.0036 per call1$0.0036
12-post weekly checkcalls x max price$0.0036 per call12$0.0432

The single lookup is a one-call probe of the URL input. The weekly check covers 12 URLs at one call for each URL. Model fees for the agent are not counted

Next action

Open the Facebook post tool page to check current inputs and price before you run the 12 URLs

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Facebook.
Explore Facebook tools and pricing

FAQ

How do I fetch a Facebook post by URL?

Use anyapi.facebook.post with url set to the full Facebook post URL. It returns data with authorName, text, createdUtc, likes, comments, shares, views and url.

What inputs does anyapi.facebook.post take?

url is required and is the full Facebook post URL. requireFields is optional and names output fields the request must return; omitting it keeps routing unchanged with the cheapest source serving.

What does found false mean for anyapi.facebook.post?

found false with reason not_found means the source states the target does not exist or returned nothing for it. It is a successful call, not an error.

What happens if requireFields names fields no single source returns together?

The request is refused as invalid input, with no charge. Choose fields only when the request must return them.

How much does a 12-post weekly check cost?

At the max_call price of $0.0036 per call, 12 calls are at most $0.0432. Successful runs settle at the actual AnyAPI charge.

What does views null mean?

views is null when the source cannot report an exact count, for example when it gives only a rounded figure such as 14K. A named field can still be absent on a post that genuinely lacks it.

What does createdUtc represent?

createdUtc is a UTC epoch timestamp in seconds. Multiply by 1000 for a JS Date in milliseconds.

Next step

Try this with Facebook

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Facebook tools

Share this article