{
  "service": "the_swarm",
  "displayName": "The Swarm",
  "categories": [
    "Data",
    "Social"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "THE_SWARM_API_KEY",
      "description": "The Swarm API key sent with the x-api-key header. Generate it from the Team Settings API page.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://www.theswarm.com",
  "actions": [
    {
      "id": "the_swarm.fetch_companies",
      "service": "the_swarm",
      "name": "fetch_companies",
      "description": "Fetch The Swarm company records by company IDs or LinkedIn company identifiers.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One The Swarm company ID.",
              "pattern": "\\S"
            },
            "description": "The Swarm company IDs to fetch.",
            "minItems": 1,
            "maxItems": 1000
          },
          "linkedinNames": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One LinkedIn company slug.",
              "pattern": "\\S"
            },
            "description": "LinkedIn company slugs to fetch.",
            "minItems": 1,
            "maxItems": 1000
          },
          "linkedinIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "One LinkedIn numeric identifier."
            },
            "description": "LinkedIn numeric identifiers accepted by The Swarm.",
            "minItems": 1,
            "maxItems": 1000
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "company_info",
                "tags"
              ],
              "description": "The company sections to include in fetch results."
            },
            "description": "Company sections to include in the response.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "The input payload for fetching The Swarm companies. At least one company identifier array is required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "The raw record returned by The Swarm."
            },
            "description": "The company records returned by The Swarm."
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One missing identifier."
            },
            "description": "The company identifiers The Swarm did not find."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw fetch companies response returned by The Swarm."
          }
        },
        "additionalProperties": false,
        "description": "The normalized The Swarm fetch companies response."
      }
    },
    {
      "id": "the_swarm.fetch_profiles",
      "service": "the_swarm",
      "name": "fetch_profiles",
      "description": "Fetch The Swarm profile records by profile IDs or LinkedIn identifiers.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One The Swarm profile ID.",
              "pattern": "\\S"
            },
            "description": "The Swarm profile IDs to fetch.",
            "minItems": 1,
            "maxItems": 1000
          },
          "linkedinNames": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One LinkedIn profile URL slug.",
              "pattern": "\\S"
            },
            "description": "LinkedIn profile URL slugs to fetch.",
            "minItems": 1,
            "maxItems": 1000
          },
          "linkedinIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "description": "One LinkedIn numeric identifier."
            },
            "description": "LinkedIn numeric identifiers accepted by The Swarm.",
            "minItems": 1,
            "maxItems": 1000
          },
          "linkedinEntityIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One LinkedIn alphanumeric entity ID.",
              "pattern": "\\S"
            },
            "description": "LinkedIn alphanumeric entity IDs to fetch.",
            "minItems": 1,
            "maxItems": 1000
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "profile_info",
                "tags",
                "lists"
              ],
              "description": "The profile sections to include in fetch results."
            },
            "description": "Profile sections to include in the response.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "The input payload for fetching The Swarm profiles. At least one profile identifier array is required."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "profiles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "The raw record returned by The Swarm."
            },
            "description": "The profile records returned by The Swarm."
          },
          "notFound": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One missing identifier."
            },
            "description": "The profile identifiers The Swarm did not find."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw fetch profiles response returned by The Swarm."
          }
        },
        "additionalProperties": false,
        "description": "The normalized The Swarm fetch profiles response."
      }
    },
    {
      "id": "the_swarm.get_credit_usage",
      "service": "the_swarm",
      "name": "get_credit_usage",
      "description": "Get the current The Swarm API credit usage for the authenticated team.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "The input payload for getting The Swarm credit usage."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "usage": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of credits consumed in the current billing period."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw credit usage response returned by The Swarm."
          }
        },
        "additionalProperties": false,
        "description": "The normalized The Swarm credit usage response."
      }
    },
    {
      "id": "the_swarm.search_companies",
      "service": "the_swarm",
      "name": "search_companies",
      "description": "Search The Swarm companies with an Elasticsearch Query DSL query and return company IDs.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Elasticsearch Query DSL query object sent to The Swarm."
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000,
            "description": "The maximum number of results to return. Use exactly 1000 when stablePagination is true."
          },
          "paginationToken": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination token returned by a previous The Swarm search response.",
            "pattern": "\\S"
          },
          "stablePagination": {
            "type": "boolean",
            "description": "Whether The Swarm should keep pagination stable while retrieving large result sets."
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "The input payload for searching The Swarm companies. When stablePagination is true, limit must be 1000."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One matching identifier."
            },
            "description": "The matching The Swarm identifiers."
          },
          "totalCount": {
            "type": "integer",
            "minimum": 0,
            "description": "The total number of records matching the query."
          },
          "paginationToken": {
            "anyOf": [
              {
                "type": "string",
                "description": "The pagination token for the next request when more results are available."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw search response returned by The Swarm."
          }
        },
        "additionalProperties": false,
        "description": "The normalized The Swarm search response."
      }
    },
    {
      "id": "the_swarm.search_profiles",
      "service": "the_swarm",
      "name": "search_profiles",
      "description": "Search The Swarm profiles with an Elasticsearch Query DSL query and return profile IDs.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Elasticsearch Query DSL query object sent to The Swarm."
          },
          "limit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000,
            "description": "The maximum number of results to return. Use exactly 1000 when stablePagination is true."
          },
          "paginationToken": {
            "type": "string",
            "minLength": 1,
            "description": "The pagination token returned by a previous The Swarm search response.",
            "pattern": "\\S"
          },
          "stablePagination": {
            "type": "boolean",
            "description": "Whether The Swarm should keep pagination stable while retrieving large result sets."
          },
          "inNetworkOnly": {
            "type": "boolean",
            "description": "Whether to restrict results to profiles connected to your team's network."
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "The input payload for searching The Swarm profiles. When stablePagination is true, limit must be 1000."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One matching identifier."
            },
            "description": "The matching The Swarm identifiers."
          },
          "totalCount": {
            "type": "integer",
            "minimum": 0,
            "description": "The total number of records matching the query."
          },
          "paginationToken": {
            "anyOf": [
              {
                "type": "string",
                "description": "The pagination token for the next request when more results are available."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw search response returned by The Swarm."
          }
        },
        "additionalProperties": false,
        "description": "The normalized The Swarm search response."
      }
    }
  ]
}
