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

# Run PageSpeed Audit

> Enqueue a Google PageSpeed Insights batch audit for specific pages or the entire site.

Enqueue a Google PageSpeed Insights audit job in the background. Audits can target specific URLs, a table `selection`, or the entire site (`allPages: true`). Use `POST /v3/page-speed/run-preview` with the same body to see what would run first.


## OpenAPI

````yaml POST /v3/page-speed/run
openapi: 3.0.0
info:
  title: SnowSEO API
  description: API documentation for SnowSEO
  version: 1.0.0
servers:
  - url: https://api.snowseo.com
    description: Production server
security:
  - bearerAuth: []
  - apiKey: []
externalDocs:
  url: https://snowseo.com/docs
  description: Find more info here
paths:
  /v3/page-speed/run:
    post:
      tags:
        - PageSpeed
      summary: Run a PageSpeed audit
      description: >-
        Measures pages with Google PageSpeed Insights and stores the results.
        SPENDS the PageSpeed API key's quota (no credits); allPages audits the
        entire site. Runs in the background; poll the page-speed list for
        status. Omit both url and targets with allPages=true to re-audit
        everything. Use page_speed_run_preview first to see how many pages would
        be tested.
      operationId: runPageSpeed
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - auditId
              properties:
                teamId:
                  type: string
                  description: SnowSEO team ID, as returned by list_teams.
                auditId:
                  type: string
                  description: SEO audit ID for this team's site.
                selection:
                  oneOf:
                    - type: object
                      required:
                        - mode
                        - ids
                      additionalProperties: false
                      properties:
                        mode:
                          type: string
                          enum:
                            - ids
                        ids:
                          type: array
                          items:
                            type: string
                    - type: object
                      required:
                        - mode
                        - filters
                        - excludedIds
                      additionalProperties: false
                      properties:
                        mode:
                          type: string
                          enum:
                            - all
                        filters:
                          type: object
                          properties:
                            search:
                              type: string
                            excluded:
                              type: string
                              enum:
                                - all
                                - included
                                - excluded
                            omitUrls:
                              type: array
                              items:
                                type: string
                            issueIds:
                              type: array
                              items:
                                type: string
                            geoAudited:
                              type: boolean
                        excludedIds:
                          type: array
                          items:
                            type: string
                targets:
                  type: array
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                      auditId:
                        type: string
                  description: Selected pages to audit.
                strategies:
                  type: array
                  items:
                    type: string
                    enum:
                      - mobile
                      - desktop
                  description: Devices to test. Defaults to both.
                allPages:
                  type: boolean
                  default: false
                  description: >-
                    Audit every page of the site. Expensive - this can consume a
                    large share of the PageSpeed API key's quota.
                force:
                  type: boolean
                  default: false
                  description: Re-audit even if the stored result is still fresh.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  eligibility:
                    type: object
                    required:
                      - selected
                      - eligible
                      - skipped
                      - byReason
                    properties:
                      selected:
                        type: number
                      eligible:
                        type: number
                      skipped:
                        type: number
                      byReason:
                        type: object
                        additionalProperties:
                          type: number
                  units:
                    type: number
                  status:
                    type: string
                  message:
                    type: string
                  url:
                    type: string
                  mobile:
                    type: object
                    nullable: true
                    additionalProperties: true
                    properties:
                      url:
                        type: string
                      scores:
                        type: object
                        additionalProperties: true
                        properties:
                          performance:
                            type: number
                            nullable: true
                          accessibility:
                            type: number
                            nullable: true
                          bestPractices:
                            type: number
                            nullable: true
                          seo:
                            type: number
                            nullable: true
                      fetchedAt:
                        type: string
                        nullable: true
                      coreWebVitals:
                        type: object
                        additionalProperties: true
                      agenticBrowsing:
                        type: object
                        additionalProperties: true
                      failedAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      informativeAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      passedAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      notApplicableAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      manualAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                  desktop:
                    type: object
                    nullable: true
                    additionalProperties: true
                    properties:
                      url:
                        type: string
                      scores:
                        type: object
                        additionalProperties: true
                        properties:
                          performance:
                            type: number
                            nullable: true
                          accessibility:
                            type: number
                            nullable: true
                          bestPractices:
                            type: number
                            nullable: true
                          seo:
                            type: number
                            nullable: true
                      fetchedAt:
                        type: string
                        nullable: true
                      coreWebVitals:
                        type: object
                        additionalProperties: true
                      agenticBrowsing:
                        type: object
                        additionalProperties: true
                      failedAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      informativeAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      passedAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      notApplicableAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      manualAudits:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                  fetchedAt:
                    type: string
                    nullable: true
                  mobileError:
                    type: string
                    nullable: true
                  desktopError:
                    type: string
                    nullable: true
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  status:
                    type: string
                  targetCount:
                    type: number
                  acceptedAt:
                    type: number
                  acceptedUrls:
                    type: array
                    items:
                      type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your SnowSEO API key (sk_...).
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````

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