> ## Documentation Index
> Fetch the complete documentation index at: https://www.hirebase.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Company Data Guide

> Learn how to work with company data in the Hirebase API

## Available Company Endpoints

Hirebase offers two main endpoints for accessing company data:

1. **POST /v2/hirebase/companies/search** - Search for companies by various criteria
2. **GET /v2/hirebase/companies/:company\_slug** - Retrieve a record for a Company

## Get Company

Retrieve a single company profile (plus a sample job listing) by its slug:

```javascript theme={null}
const getCompanies = async (page = 1, limit = 10) => {
  const response = await fetch(`https://api.hirebase.org/v2/hirebase/companies/nextdoor`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY',
    },
  });
  
  const data = await response.json();
  return data;
};
```

### Response Structure

```json theme={null}
{
    "company": {
        "company_slug": "nextdoor",
        "company_name": "Nextdoor",
        "company_logo": "https://recruiting.cdn.greenhouse.io/external_greenhouse_job_boards/logos/000/000/114/resized/Nextdoor_logo_badge-circle_RGB.png?1613705682",
        "job_board": null,
        "linkedin_link": "https://www.linkedin.com/company/nextdoor-com",
        "company_link": "about.nextdoor.com",
        "description_summary": "Nextdoor is a social platform connecting neighbors for community support and local engagement.",
        "size_range": null,
        "industries": [
            "Tech, Software & IT Services"
        ],
        "subindustries": [
            "Internet of Things (IoT)",
            "Digital Media & Entertainment"
        ]
    },
    "jobs": [
        {
			// 1 example Jobs Object from this company, or none if the company has no open jobs
        }
    ]
}
```

## Get Company Jobs

The GET endpoint allows you to retrieve companies with basic pagination:

```javascript theme={null}
const getCompanies = async (page = 1, limit = 10) => {
  const response = await fetch(`https://api.hirebase.org/v2/hirebase/companies/nextdoor/jobs?page=1&limit=10`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY',
    },
  });
  
  const data = await response.json();
  return data;
};
```

### Response Structure

```json theme={null}
{
    "jobs": [
        // Up to `limit` job objects (may be fewer than `limit`)
    ],
    "job_categories": [ // Categories found that the company is hiring for
        {
            "category": "Engineering Jobs"
        },
        {
            "category": "Software Engineer Jobs"
        },
        {
            "category": "Product Jobs"
        }
    ],
    "total_count": 4,
    "page": 1,
    "limit": 10,
    "total_pages": 1
}
```

## Searching Companies

The search endpoint provides more powerful filtering options:

```javascript theme={null}
const searchCompanies = async () => {
  const response = await fetch('https://api.hirebase.org/v2/hirebase/companies/search', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY',
    },
    body: JSON.stringify({
      query: "Artificial Intelligence",
      hq_geolocations: [
        { city: "San Francisco", region: "California", country: "United States" }
      ],
      industries: ["Tech, Software & IT Services"],
      types: ["Startup"],
      page: 1,
      limit: 10
    }),
  });
  
  const data = await response.json();
  return data;
};
```

### Search Parameters

<AccordionGroup>
  <Accordion title="Basic Search">
    * `query`: General search term matching company descriptions
    * `company_name`: Filter by specific company name
  </Accordion>

  <Accordion title="Location">
    * `hq_geolocations`: Array of HQ location objects with `city`, `region`, and `country` (OR across entries)
  </Accordion>

  <Accordion title="Industry and Company Type">
    * `industries`: Array of industry categories
    * `subindustries`: Array of more specific industry categories
    * `company_types`: Headcount buckets (e.g., `"1-10"`, `"51-200"`)
    * `types`: Categorical labels (e.g., `"Startup"`, `"Enterprise"`, `"Non-Profit"`)
  </Accordion>

  <Accordion title="Pagination">
    * `page`: Page number for pagination
    * `limit`: Number of results per page
  </Accordion>
</AccordionGroup>

## Use Cases for Company Data

### Finding Companies in a Specific Industry

```javascript theme={null}
const findAICompanies = async () => {
  const response = await fetch('https://api.hirebase.org/v2/hirebase/companies/search', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY',
    },
    body: JSON.stringify({
      industries: ["Tech, Software & IT Services"],
      subindustries: ["AI & ML"],
      limit: 20
    }),
  });
  
  const data = await response.json();
  return data;
};
```

### Company Profile Enrichment

Once you have a company's data, you can use it to enhance job listings or build company profiles in your application and search through their jobs.

## Next Steps

* Learn how to [search for jobs](/docs/guides/search-jobs) at specific companies
* Explore the [Companies API Reference](/docs/api-reference/companies/search-companies) for detailed endpoint documentation
