Meta Graph API icon

Meta Graph API

Interact with Meta Graph API with automatic cursor pagination and batching. Follows "next" cursors automatically — no loops needed.

Meta Graph API

AI-generated

Summary

Fetches or manipulates data from the Meta Graph API using HTTP requests with automatic cursor pagination for GET operations and multipart file upload support for POST requests.

Inputs

  • hostUrl (required) — The host URL for the request (default: graph.facebook.com). Only video uploads use graph-video.facebook.com.
  • httpRequestMethod (required) — The HTTP method for the request (GET, POST, or DELETE).
  • graphApiVersion (required) — The Graph API version to use (default: v24.0).
  • node (required) — The node to operate on (e.g., me, act_123456789, page-id).
  • edge — Edge of the node (e.g., ads, campaigns, insights, posts).
  • fields — Comma-separated list of fields to return (only available for GET requests).
  • limit — Number of records per page (only available for GET requests, max 500).
  • autoPagination — Whether to automatically follow 'next' cursors from the Graph API (only available for GET requests).
  • maxPages — Maximum number of pages to fetch (only available when autoPagination is enabled, 0 for unlimited).
  • allowUnauthorizedCerts — Whether to connect even if SSL certificate validation is not possible.
  • sendBinaryData (required) — Whether binary data should be sent as body (only available for POST requests).
  • binaryPropertyName — The name of the input binary field containing the file to upload (only available when sendBinaryData is true).
  • options.queryParameters — Additional query string parameters to send.
  • options.queryParametersJson — Additional query string parameters as a JSON object.
  • options.batchInterval — Delay in milliseconds between each pagination page request.
  • options.itemInterval — Delay in milliseconds between processing each input item (default: 500ms).
  • options.requestTimeout — Timeout in milliseconds for each HTTP request (default: 30000ms).
  • options.retryOnConnectionError — Whether to automatically retry when a connection error occurs (default: true).
  • options.includeInputData — Whether to merge the input item data into each output record.
  • options.outputMode — How data should be returned ('individual' or 'raw').

Output shape

A list of items. If 'Output Mode' is 'Individual Items', each record from the 'data' field becomes a separate item. If 'Raw Response', the full API response (including paging info) is returned as a single item. Binary file uploads return the upload status (success/failure) only.

For GET requests with auto-pagination enabled, the node automatically follows 'next' cursors and collects all records. Errors are handled gracefully when 'Continue on Fail' is enabled; partial results from prior pages may be returned before an error item.

Examples

Example 1: Fetch all active ads for an ad account with pagination.

Host URL: graph.facebook.com, Method: GET, Node: act_123456789, Edge: ads, Fields: id,name,effective_status, includeInputData: true to keep context.

Example 2: Upload a video file to a Facebook Page.

Host URL: graph-video.facebook.com, Method: POST, Node: page-id, Edge: videos, sendBinaryData: true, binaryPropertyName: file:data.

Example 3: Retrieve insights data with a specific API version and rate limit handling.

Graph API Version: v23.0, Node: me, Edge: insights, Fields: impressions, reach, includeInputData: true, itemInterval: 500.

Links

Discussion