{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook URL to ID - Page, Profile, Group & Post IDs",
    "description": "Convert Facebook URLs, usernames and @handles to numeric IDs in bulk: Pages, profiles, groups, pfbid posts, videos, reels, photos, events, hashtags and share links. Classic Page ID, owner IDs, type and name. $2.60 per 1,000 IDs, no start fee, no login.",
    "version": "0.1",
    "x-build-id": "ndtij8Gq5gGTv1DGN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~facebook-url-to-id/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-facebook-url-to-id",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/topapi~facebook-url-to-id/runs": {
      "post": {
        "operationId": "runs-sync-topapi-facebook-url-to-id",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/topapi~facebook-url-to-id/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-facebook-url-to-id",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "fbUrls": {
            "title": "Facebook URLs",
            "type": "array",
            "description": "Pages, profiles, profile.php?id=, groups, posts (incl. pfbid), group posts, videos, watch?v=, reels, photos, albums, events, hashtags, /share/ and fb.watch links. www, m., web. and fb.com hosts all work.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "ids": {
            "title": "Vanity names, @handles or numeric ids",
            "type": "array",
            "description": "e.g. \"cocacola\", \"@Meta\", \"100044561550831\". A bare numeric id is looked up and typed (Page, post, photo, reel...).",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch details",
            "type": "boolean",
            "description": "Names, usernames, the classic Page ID, Page or person, verified badge, followers, the owner of posts, videos, reels and photos. Off: URLs that carry an id are read from the URL alone.",
            "default": true
          },
          "resolveFromUrlOnly": {
            "title": "Resolve from the URL only",
            "type": "boolean",
            "description": "Never contact Facebook: only ids printed in the URL are returned. Vanity names, pfbid posts and share links come back as needsLookup rows (free).",
            "default": false
          },
          "includeCategory": {
            "title": "Page category",
            "type": "boolean",
            "description": "Also read the Page category (e.g. \"Video Game\"). It sits further down the Page, so a run with many Pages takes a little longer. Needs Fetch details.",
            "default": true
          },
          "types": {
            "title": "Only these types",
            "type": "array",
            "description": "Keep only rows of these object types. Empty = every type.",
            "items": {
              "type": "string",
              "enum": [
                "page",
                "profile",
                "group",
                "group_post",
                "post",
                "video",
                "reel",
                "photo",
                "album",
                "event",
                "hashtag"
              ],
              "enumTitles": [
                "Pages",
                "Personal profiles",
                "Groups",
                "Group posts",
                "Posts",
                "Videos",
                "Reels",
                "Photos",
                "Albums",
                "Events",
                "Hashtags"
              ]
            }
          },
          "verifiedOnly": {
            "title": "Verified only",
            "type": "boolean",
            "description": "Keep only Pages and profiles with Facebook's verified badge. Other object types (posts, groups...) are not affected.",
            "default": false
          },
          "minFollowers": {
            "title": "Minimum followers",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Keep only Pages and profiles with at least this many followers. 0 = no minimum. Other object types are not affected.",
            "default": 0
          },
          "dedupeById": {
            "title": "One row per Facebook id",
            "type": "boolean",
            "description": "When several inputs resolve to the same object (e.g. /nintendo and /NintendoAmerica), keep the first row only. The others are not charged.",
            "default": false
          },
          "checkAdsLibrary": {
            "title": "Check the Ad Library",
            "type": "boolean",
            "description": "Pages: whether the Page runs ads right now and how many (Meta Ad Library). Charged as ad-library-check ($0.001) per Page row that gets a count. Needs Fetch details.",
            "default": false
          },
          "monitorMode": {
            "title": "Only new or changed rows",
            "type": "boolean",
            "description": "Deliver only inputs that are new or whose id, username, name, owner or status changed since the last run (renamed, deleted, made private). Unchanged rows are not delivered or charged. Pairs with a daily schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Name of the key-value store that remembers the last run. Use one name per list you watch.",
            "default": "facebook-url-to-id-monitor"
          },
          "maxItems": {
            "title": "Maximum ids",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many delivered ids (error rows do not count). 0 = every input.",
            "default": 0
          },
          "includeFailedRows": {
            "title": "Write rows for failed inputs",
            "type": "boolean",
            "description": "Also write a free row with status and error for inputs that have no id (not found, private, invalid, unreachable). Off = they are listed in RUN_SUMMARY only.",
            "default": true
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Core fields only (input, status, type, facebookId, pageId, ownerId, username, name, url), sized for AI agents and MCP.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default: Apify's own connection first, then the Apify proxy if Facebook refuses it, then RESIDENTIAL for the rest of the run if the proxy is refused too (capped per run).",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Page reads in parallel (lookups always go 15 per Facebook request, up to 4 at a time).",
            "default": 8
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}