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

# Get categories

> Get categories.

Get categories.

**Credits:** 5 per successful request. Failed requests and empty result sets are not charged.

## Authentication

<ParamField header="X-API-Key" type="string" required>Your ScrapeBadger API key.</ParamField>

## Parameters

<ParamField query="query" type="string" default="laptop">
  Query. Minimum length: 1.
</ParamField>

## Response

```json theme={null}
{
  "query": "laptop",
  "categories": [
    {
      "parentFacetField": null,
      "displayName": "Category",
      "facetDisplay": "Yes",
      "facetField": "category_facet",
      "maxValue": 6,
      "values": [
        {
          "count": null,
          "value": "All Laptops",
          "categoryPath": "pcmcat138500050001",
          "nestedValues": [
            {
              "categoryPath": "pcmcat247400050000",
              "value": "Windows Laptops",
              "__typename": "SearchNestedValue"
            }
          ],
          "__typename": "SearchFacetValue"
        }
      ],
      "__typename": "SearchFacet"
    }
  ]
}
```

## Example

```bash theme={null}
curl --get 'https://scrapebadger.com/v1/bestbuy/categories' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --data-urlencode 'query=laptop'
```

[Browse all Best Buy endpoints](/bestbuy/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.