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

# List Opportunity Types

> List a brand's optimization opportunities grouped by type — one row per best practice, with the projected site-score lift (`site_impact_pp`), how many pages it touches (`page_count`), and where those pages sit in the pipeline (`pending`/`reviewed`/`staged`/`deployed` counts).

Counts and lift span the whole brand and match each type's detail view. For a brand using the new Site Optimization page selection, they cover its enabled pages instead. Ordered most-affected first.



## OpenAPI

````yaml /api-reference/openapi.json get /{brand_id}/opportunities/by-type
openapi: 3.1.0
info:
  title: Scrunch Data API
  version: 0.1.0
servers:
  - url: https://api.scrunchai.com/v1
security: []
paths:
  /{brand_id}/opportunities/by-type:
    get:
      tags:
        - opportunities
      summary: List Opportunity Types
      description: >-
        List a brand's optimization opportunities grouped by type — one row per
        best practice, with the projected site-score lift (`site_impact_pp`),
        how many pages it touches (`page_count`), and where those pages sit in
        the pipeline (`pending`/`reviewed`/`staged`/`deployed` counts).


        Counts and lift span the whole brand and match each type's detail view.
        For a brand using the new Site Optimization page selection, they cover
        its enabled pages instead. Ordered most-affected first.
      operationId: listOpportunityTypes
      parameters:
        - name: brand_id
          in: path
          required: true
          schema:
            type: integer
            title: Brand Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OptimizationTypeSummary'
                title: Response Listopportunitytypes
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer:
            - query
components:
  schemas:
    OptimizationTypeSummary:
      properties:
        best_practice_id:
          type: string
          title: Best Practice Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        bucket:
          type: string
          enum:
            - hygiene
            - transformation
            - enrichment
          title: Bucket
        bucket_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket Label
        bucket_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Bucket Description
        action:
          type: string
          title: Action
        site_impact_pp:
          anyOf:
            - type: number
            - type: 'null'
          title: Site Impact Pp
        site_impact_unavailable_reason:
          anyOf:
            - type: string
              enum:
                - not_in_scored_run
                - no_scored_run
            - type: 'null'
          title: Site Impact Unavailable Reason
        page_count:
          type: integer
          title: Page Count
        undrafted_page_count:
          type: integer
          title: Undrafted Page Count
          default: 0
        pending_count:
          type: integer
          title: Pending Count
        reviewed_count:
          type: integer
          title: Reviewed Count
        staged_count:
          type: integer
          title: Staged Count
        deployed_count:
          type: integer
          title: Deployed Count
      type: object
      required:
        - best_practice_id
        - name
        - bucket
        - action
        - site_impact_pp
        - page_count
        - pending_count
        - reviewed_count
        - staged_count
        - deployed_count
      title: OptimizationTypeSummary
      description: >-
        One opportunity type's row in the Optimizations by-type list: the same
        header its detail view

        shows — counts and projected lift computed server-side over the WHOLE
        type — so the list and the

        detail always agree, with no client-side cap. Only types with a
        reviewable change are listed.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Get Opportunity Type Detail](/api-reference/opportunities/get-opportunity-type-detail.md)
- [List Site Diagnostics](/api-reference/site-diagnostics/list-site-diagnostics.md)
- [Opportunities API: Ranked fixes by projected site lift](/api-reference/opportunities/overview.md)
