{
  "openapi": "3.0.1",
  "info": {
    "title": "X Community Members Scraper",
    "description": "Scrape X (Twitter) Community members and community profiles: handles, bios, followers, rules, creator. No login or cookies. MCP-ready. $0.005 per member.",
    "version": "1.0",
    "x-build-id": "gT1EhZccLiZrWd3Al"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~x-community-members-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-x-community-members-scraper",
        "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/khadinakbar~x-community-members-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-x-community-members-scraper",
        "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/khadinakbar~x-community-members-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-x-community-members-scraper",
        "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",
        "required": [
          "communities"
        ],
        "properties": {
          "communities": {
            "title": "Communities",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Use this when you need members and profile details for one or more X/Twitter Communities. Accepts community URLs or numeric IDs, for example https://x.com/i/communities/1699807431709041070 or 1699807431709041070. Provide 1 to 100 communities. This is not a user handle or hashtag field.",
            "items": {
              "type": "string"
            }
          },
          "includeActiveMembers": {
            "title": "Include active members",
            "type": "boolean",
            "description": "Use this to return active members derived from the community's recent public posts, each enriched with handle, name, bio, and follower count. Defaults to true. X does not expose the full private member roster without login, so this surfaces visible active members, not every member of large communities.",
            "default": true
          },
          "maxMembersPerCommunity": {
            "title": "Max members per community",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Use this to cap member rows saved per community, for example 50. Accepted range is 0 to 200. Defaults to 50. Active-member yield is bounded by how many distinct authors appear in recent community posts, so very large caps may return fewer rows than requested.",
            "default": 50
          },
          "includeFeaturedMembers": {
            "title": "Include featured members",
            "type": "boolean",
            "description": "Use this to include the community creator and the featured member facepile shown on the community page. Defaults to true. Facepile members may have only an avatar and user ID when X does not expose their handle. This is not the full member list.",
            "default": true
          },
          "includeCommunityProfile": {
            "title": "Include community profile record",
            "type": "boolean",
            "description": "Use this to emit one community profile record per community with name, description, member count, creation date, rules, topic, and creator. Defaults to true. Set to false when you only want member rows. This does not change member extraction.",
            "default": true
          },
          "providerOrder": {
            "title": "Provider order",
            "enum": [
              "auto",
              "scrapecreators-first",
              "sociavault-first"
            ],
            "type": "string",
            "description": "Use this to force the data-provider order during testing or fallback checks. Values are auto, scrapecreators-first, or sociavault-first. Defaults to auto, which tries ScrapeCreators before SociaVault when both secrets exist. This is not exposed to X users.",
            "default": "auto"
          },
          "dedupeMembers": {
            "title": "Dedupe members",
            "type": "boolean",
            "description": "Use this to avoid duplicate member rows when the same account is featured and also posts in the community. Matching is by X user ID first, then normalized username. Defaults to true. This does not dedupe across different communities.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw provider payload",
            "type": "boolean",
            "description": "Use this only when debugging field drift or validating provider parity. It attaches the raw provider object to each dataset item. Defaults to false for small MCP-friendly output. This is not needed for normal member exports.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}