> **For AI agents:** this page is a focused, LLM-optimized view of a
> single Fiber AI operation. Before calling it, fetch the routing
> instructions at [`https://api.fiber.ai/llms.txt`](https://api.fiber.ai/llms.txt) and the full operation
> index at [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md).

# getDepartmentSize

`POST /v1/department-size`

**Tags:** `Company info`

Count employees per department

**Endpoint:** `https://api.fiber.ai/v1/department-size`

## Description

Counts how many current employees at a company fall into each department you define. Unlike the depth-chart endpoint, this Synchronous endpoint provides immediate results without waiting for background job generation. You supply the job titles that define each department (no seniority is considered), and every current employee is counted — not just a sample. This endpoint performs a headcount snapshot for direct, actionable data.

⚡ Rate limit: 60 requests per 1 minute

💰 Cost: 2 credits per company ⓘ

⏱ Recommended timeout: 1 minute ⓘ

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "Your Fiber API key"
    },
    "company": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "identifier": {
              "type": "string",
              "enum": [
                "linkedinUrl"
              ]
            },
            "value": {
              "type": "string",
              "minLength": 1,
              "description": "LinkedIn company URL (e.g. 'https://www.linkedin.com/company/openai')."
            }
          },
          "required": [
            "identifier",
            "value"
          ]
        },
        {
          "type": "object",
          "properties": {
            "identifier": {
              "type": "string",
              "enum": [
                "linkedinSlug"
              ]
            },
            "value": {
              "type": "string",
              "minLength": 1,
              "description": "LinkedIn company slug (e.g. 'openai')."
            }
          },
          "required": [
            "identifier",
            "value"
          ]
        },
        {
          "type": "object",
          "properties": {
            "identifier": {
              "type": "string",
              "enum": [
                "linkedinOrgId"
              ]
            },
            "value": {
              "type": "string",
              "pattern": "^\\d+$",
              "minLength": 1,
              "description": "LinkedIn numeric organization ID (e.g. '11130470')."
            }
          },
          "required": [
            "identifier",
            "value"
          ]
        },
        {
          "type": "object",
          "properties": {
            "identifier": {
              "type": "string",
              "enum": [
                "domain"
              ]
            },
            "value": {
              "type": "string",
              "minLength": 1,
              "description": "Company website domain (e.g. 'openai.com')."
            }
          },
          "required": [
            "identifier",
            "value"
          ]
        }
      ],
      "description": "Company identifier. Set identifier to 'linkedinUrl', 'linkedinSlug', 'linkedinOrgId', or 'domain' and provide the corresponding value."
    },
    "departments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "Your label for this department (e.g. 'Engineering')."
          },
          "titles": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Match employees against a job-title list you provide.",
                    "enum": [
                      "manual"
                    ]
                  },
                  "include": {
                    "type": "object",
                    "properties": {
                      "titles": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "minItems": 1,
                        "maxItems": 400,
                        "description": "Job-title strings that qualify an employee for this department."
                      }
                    },
                    "required": [
                      "titles"
                    ],
                    "description": "Title filter for including employees in this department."
                  },
                  "exclude": {
                    "type": "object",
                    "properties": {
                      "titles": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        },
                        "maxItems": 400,
                        "default": [],
                        "description": "Job-title strings that disqualify an employee even if they matched include.titles. Omit this object or pass an empty list to exclude nobody."
                      }
                    },
                    "default": {
                      "titles": []
                    },
                    "description": "Optional title filter for excluding employees from this department."
                  }
                },
                "required": [
                  "type",
                  "include"
                ]
              }
            ],
            "description": "How to decide which employees belong to this department."
          }
        },
        "required": [
          "name",
          "titles"
        ]
      },
      "minItems": 1,
      "maxItems": 20,
      "description": "Departments to size. Each is counted independently against ALL current employees, so overlapping definitions may count the same person in more than one department."
    }
  },
  "required": [
    "apiKey",
    "company",
    "departments"
  ]
}
```

## Response — success (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "output": {
      "type": "object",
      "properties": {
        "company": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "description": "Company name"
            },
            "linkedinUrl": {
              "type": [
                "string",
                "null"
              ],
              "description": "Full LinkedIn company profile URL"
            },
            "linkedinOrgId": {
              "type": [
                "string",
                "null"
              ],
              "description": "LinkedIn organization ID for the company"
            },
            "domain": {
              "type": [
                "string",
                "null"
              ],
              "description": "Company primary domain"
            }
          },
          "description": "Company identification details"
        },
        "headcount": {
          "type": "number",
          "minimum": 0,
          "description": "Public sources reported total employees at the company (the percentage denominator). Per-department counts come from profile matching and may not sum to this value."
        },
        "departments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The department label you supplied"
              },
              "count": {
                "type": "number",
                "minimum": 0,
                "description": "Number of current employees matching this department"
              },
              "percentOfHeadcount": {
                "type": "number",
                "minimum": 0,
                "description": "Department count as a percentage of total company headcount (0–100, rounded to 2 decimal places). Because departments are counted independently, values across departments need not sum to 100. Due to approximation above 40K employees, this can slightly exceed 100."
              }
            },
            "required": [
              "name",
              "count",
              "percentOfHeadcount"
            ]
          },
          "description": "One entry per input department, in the same order"
        }
      },
      "required": [
        "company",
        "headcount",
        "departments"
      ]
    },
    "chargeInfo": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-now"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged"
          ],
          "description": "Credits were charged immediately for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charging-later"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "Credits will be charged after the operation completes"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-for-async-process"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged",
            "message"
          ],
          "description": "Credits that were charged for an asynchronous operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "free"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "No credits were charged for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "credits-refunded"
              ]
            },
            "creditsRefunded": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsRefunded",
            "message"
          ],
          "description": "Credits were refunded for this operation"
        }
      ]
    },
    "warnings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Full path to extraneous field (e.g., 'searchParams.ExtraField')"
          },
          "message": {
            "type": "string",
            "description": "Warning message"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "description": "Warnings about extraneous fields in request"
    },
    "advice": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Tips, recommendations, and suggestions for using this API effectively."
    }
  },
  "required": [
    "output",
    "chargeInfo"
  ],
  "additionalProperties": false
}
```

---

Canonical JSON: [`https://api.fiber.ai/openapi.json`](https://api.fiber.ai/openapi.json)
Operation index: [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md)
