Install
openclaw skills install @xyzzero/keyapi-facebookExplore and analyze public Facebook data through the KeyAPI REST API using live official docs. Use for profile and page details, profile posts, photos, Reels, group details, group posts, future group events, and profile/group identifier resolution.
openclaw skills install @xyzzero/keyapi-facebookTurn natural-language Facebook requests into documentation-guided KeyAPI REST workflows. Start from the user's business goal, map it to the closest scenario, verify the current endpoint contract in the latest KeyAPI docs, then execute the request with a helper script when available or with direct REST when it is not.
https://docs.keyapi.ai/llms.txt and linked endpoint pages as the source of truth for method, /v1/... path, parameters, enums, pagination, request body, and response shape.KEYAPI_TOKEN.For Facebook data lookup, ranking, analysis, search, comparison, or reporting, use KeyAPI API execution and official KeyAPI docs. Do not use platform web pages as a substitute for API results.
references/global-rules.md as the base execution contract.node scripts/configure-keyapi-auth.mjs --status when script execution is available and setup state is unknown; treat authStatus: "available" as ready and authStatus: "unavailable" as missing credentials.authStatus is unavailable, stop live execution, load references/setup-and-auth.md, and tell the user the exact setup command: node scripts/configure-keyapi-auth.mjs. Do not only say "set KEYAPI_TOKEN".references/scenarios.md to map the request to a Facebook scenario.references/routing-policy.md to choose search/list, detail, resolver, ranking/trend, related-entity, or composed workflow patterns.references/facebook-rules.md for Facebook-specific identifiers, pagination, and reporting rules.references/scenarios.md when the request maps to a curated scenario.node scripts/search-keyapi-docs.mjs --query "<semantic entity action>" --resolve when the helper script is available; otherwise open https://docs.keyapi.ai/llms.txt and the selected endpoint page directly. Build the query from the inferred scenario/API concept, not by copying vague or translated user wording literally./v1/... path, required query/body parameters, examples, and response contract before any live API call. Never infer API paths from docs URLs, scenario names, endpoint titles, remembered routes, or a previous 404.node scripts/keyapi-api.mjs for live REST calls when script execution is available. Use the host's HTTP client only when scripts are unavailable or the helper cannot express the documented request.code = 0 means success; non-zero code is an API-level failure.Read references/scenarios.md to choose the best scenario card. If no exact scenario fits, use the nearest scenario with explicit assumptions or fall back to advanced mode that exposes filters gradually. Treat the official docs index as the endpoint source of truth, not the scenario card.
Compress parameter-heavy APIs into these decision fields:
When the user has not set up credentials yet, proactively provide the setup script command. Do not answer only with "configure KEYAPI_TOKEN".
When authStatus is unavailable:
KEYAPI_TOKENnode scripts/configure-keyapi-auth.mjs when script execution is availablenode scripts/configure-keyapi-auth.mjs --status for checking whether authentication is available--status reports available or unavailable; continue live requests when it reports availableThis skill includes helper scripts under scripts/ for reliable local execution:
scripts/configure-keyapi-auth.mjsscripts/search-keyapi-docs.mjsscripts/keyapi-api.mjsRun script commands from this skill directory. If the host agent uses a different current working directory, resolve scripts/... relative to this SKILL.md. For large JSON bodies, especially base64 image payloads, prefer --body-file or --image-file instead of inline --body. keyapi-api.mjs always sends live API requests; repeating identical requests calls the API again. The helper does not create local response files unless --output-file is supplied. Large responses may return a stdout preview; when complete fields are needed for extraction, sorting, aggregation, or validation, use --output-file to save the full helper result and read the API payload from data.data. For agent-internal analysis, write to a temporary path such as the OS temp directory or a workspace .tmp-keyapi-*.json file; do not present that temporary file as a user deliverable, and clean it up when practical or briefly mention it in the final answer. When the user asks to save results, export JSON, or provide a file, treat --output-file as an intentional user-facing output file. Use --stdout full only when the user explicitly needs raw JSON in stdout. For query strings, prefer repeated --query-param key=value or --param key=value; use --query-file query.json or --query only when structured array/object query values are needed. Query sources merge in this order: --query, --query-file, then repeated query params, with later values overriding earlier ones; empty query-param values are not sent.
Prefer them in this order when script execution is available:
If script execution is unavailable in the host agent, or if the helper cannot express the documented request, do not fail the task. Use the same documented REST method, path, headers, query, and body with the host's available HTTP client.
Resolve current docs for this platform:
node scripts/search-keyapi-docs.mjs --query "<entity action>" --resolve
Execute a documented GET endpoint:
node scripts/keyapi-api.mjs --path /v1/facebook/... --query-param example=value
Execute query parameters from a JSON file:
node scripts/keyapi-api.mjs --path /v1/facebook/... --query-file query.json
Preview a large response without saving:
node scripts/keyapi-api.mjs --path /v1/facebook/... --query-param example=value --stdout preview
Write a complete response to a temporary file for internal analysis:
node scripts/keyapi-api.mjs --path /v1/facebook/... --query-param example=value --output-file .tmp-keyapi-facebook-response.json
Save or export a complete response for the user:
node scripts/keyapi-api.mjs --path /v1/facebook/... --query-param example=value --output-file response.json
Execute a documented POST endpoint:
node scripts/keyapi-api.mjs --path /v1/facebook/... --method POST --body '{"example":"value"}'
Execute a documented POST endpoint with a large JSON body:
node scripts/keyapi-api.mjs --path /v1/facebook/... --method POST --body-file request.json
Execute an image JSON endpoint from a local file:
node scripts/keyapi-api.mjs --path /v1/facebook/... --method POST --query-param example=value --image-file ./image.jpg --image-field image_base64
references/global-rules.mdreferences/scenarios.mdreferences/routing-policy.mdreferences/facebook-rules.mdreferences/facebook-profile-rules.mdreferences/facebook-profile-content-rules.mdreferences/facebook-group-rules.mdreferences/setup-and-auth.md