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

# Get Demand Growth Trends

> Identify stations with growing or declining demand trends over time using linear regression. Returns stations ranked by growth rate, utilization trend coefficients, growing vs declining station lists, and confidence scores for each trend.

Use this to guide capacity adjustments and identify stations that may need expansion or closure.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions
- **404**: `no_data_binding` when the provider or location is not enabled for your company, or no data for that location and period
- **422**: Invalid filter parameters
- **500**: Internal server error

**Required Auth Scopes:**
- `copilot:analytics`



## OpenAPI

````yaml /api-reference/openapi.json get /copilot/station-based/{provider}/growth_trends
openapi: 3.1.0
info:
  title: SWITCH API
  version: '1.0'
  description: >-
    The SWITCH API gives mobility and logistics teams programmatic access to
    SWITCH forecasts, fleet operations, routing and analytics. Every request is
    authenticated with an API key sent as a bearer token.
servers:
  - url: https://api.getswitch.io
    description: Production
security: []
tags:
  - name: Forecast
    description: Demand forecasts per zone and time window.
  - name: Operations
    description: Fleet imbalance, rebalancing suggestions and generated tasks.
  - name: Routing
    description: Route optimisation for single and multiple fleets.
  - name: Routing Sessions
    description: Saved routing sessions, their routes and drivers.
  - name: Routing Operations
    description: Complete, undo and re-route the stops of a route.
  - name: Fleet Management
    description: Your depots, stations, drivers and cargo vehicles.
  - name: Integrations
    description: Vehicles, statuses and commands on your fleet platform.
  - name: Station Based Analytics
    description: Analytics for station-based (docked) services.
  - name: Zone Based Analytics
    description: Analytics for free-floating services, by zone.
  - name: Free Float Analytics
    description: Trip history for free-floating services.
  - name: Transit Analytics
    description: Punctuality and service delivery for public transit.
  - name: Live
    description: Real-time fleet, delivery and transit status.
  - name: Grids
    description: Spatial grids used by forecasts and analytics.
  - name: API Keys
    description: Create and manage the API keys you call this API with.
paths:
  /copilot/station-based/{provider}/growth_trends:
    get:
      tags:
        - Station Based Analytics
      summary: Get Demand Growth Trends
      description: >-
        Identify stations with growing or declining demand trends over time
        using linear regression. Returns stations ranked by growth rate,
        utilization trend coefficients, growing vs declining station lists, and
        confidence scores for each trend.


        Use this to guide capacity adjustments and identify stations that may
        need expansion or closure.


        **Failure Modes:**

        - **401**: Token is missing or invalid

        - **403**: Insufficient permissions

        - **404**: `no_data_binding` when the provider or location is not
        enabled for your company, or no data for that location and period

        - **422**: Invalid filter parameters

        - **500**: Internal server error


        **Required Auth Scopes:**

        - `copilot:analytics`
      operationId: get_growth_trends
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            type: string
            description: >-
              Identifier of the mobility provider whose data you analyse, e.g.
              `acme-bikes`. It must be the provider of a data source enabled for
              your company's station-based analytics; any other value is refused
              with 404 `no_data_binding` (`kind: source`). Your SWITCH contact
              tells you the provider identifiers and locations enabled for your
              company.
            title: Provider
          description: >-
            Identifier of the mobility provider whose data you analyse, e.g.
            `acme-bikes`. It must be the provider of a data source enabled for
            your company's station-based analytics; any other value is refused
            with 404 `no_data_binding` (`kind: source`). Your SWITCH contact
            tells you the provider identifiers and locations enabled for your
            company.
        - name: geolabel
          in: query
          required: true
          schema:
            type: string
            description: >-
              Location to analyse, e.g. `milan`: one of the locations (or their
              geolabels) that your company's station-based analytics are enabled
              for with this provider. Any other value is refused with 404
              `no_data_binding` (`kind: location`).
            title: Geolabel
          description: >-
            Location to analyse, e.g. `milan`: one of the locations (or their
            geolabels) that your company's station-based analytics are enabled
            for with this provider. Any other value is refused with 404
            `no_data_binding` (`kind: location`).
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: >-
              Start of the analysis period, an ISO 8601 date-time with a time
              zone, e.g. `2026-10-01T00:00:00Z`.
            title: Start Date
          description: >-
            Start of the analysis period, an ISO 8601 date-time with a time
            zone, e.g. `2026-10-01T00:00:00Z`.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: >-
              End of the analysis period, an ISO 8601 date-time with a time
              zone, e.g. `2026-10-31T23:59:59Z`. Must be after `start_date`, at
              most 366 days later.
            title: End Date
          description: >-
            End of the analysis period, an ISO 8601 date-time with a time zone,
            e.g. `2026-10-31T23:59:59Z`. Must be after `start_date`, at most 366
            days later.
        - name: start_hour
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            maximum: 23
            minimum: 0
            description: >-
              First hour of the day to include (0-23, local time of the city).
              Set together with `end_hour`; both bounds are included.
            title: Start Hour
          description: >-
            First hour of the day to include (0-23, local time of the city). Set
            together with `end_hour`; both bounds are included.
        - name: end_hour
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            maximum: 23
            minimum: 0
            description: >-
              Last hour of the day to include (0-23, local time of the city),
              not before `start_hour`. Set together with `start_hour`.
            title: End Hour
          description: >-
            Last hour of the day to include (0-23, local time of the city), not
            before `start_hour`. Set together with `start_hour`.
      responses:
        '200':
          description: >-
            Growth trend data retrieved. Returns per-station trend direction,
            growth rate, and confidence scores.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pulse__core_api_lib__data_manager__analyses__station_based__schemas__GrowthTrendsResponse
        '401':
          description: Unauthorized. Token is missing or invalid.
        '403':
          description: Forbidden. Insufficient permissions.
        '422':
          description: Unprocessable Entity. Validation failed.
        '500':
          description: Internal Server Error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    pulse__core_api_lib__data_manager__analyses__station_based__schemas__GrowthTrendsResponse:
      properties:
        growing_stations:
          items:
            $ref: '#/components/schemas/TrendData'
          type: array
          title: Growing Stations
          description: >-
            Top 10 stations showing the highest positive growth in utilization
            over the analysis period, ranked by growth rate
          examples:
            - - confidence_score: 0.85
                ebike_ratio: 0.4
                growth_rate: 0.15
                station_id: 123
                station_latitude: 45.464664
                station_longitude: 9.18854
                station_name: Central Station
                trend_direction: growing
        declining_stations:
          items:
            $ref: '#/components/schemas/TrendData'
          type: array
          title: Declining Stations
          description: >-
            Top 10 stations showing the highest negative growth in utilization
            over the analysis period, ranked by decline rate
          examples:
            - - confidence_score: 0.78
                ebike_ratio: 0.25
                growth_rate: -0.08
                station_id: 456
                station_latitude: 45.468664
                station_longitude: 9.19254
                station_name: Park Avenue
                trend_direction: declining
      type: object
      required:
        - growing_stations
        - declining_stations
      title: GrowthTrendsResponse
      description: Growth trends analysis response with station utilization patterns.
      examples:
        - declining_stations:
            - confidence_score: 0.56
              ebike_ratio: 0.35
              growth_rate: -0.018
              station_id: 101
              station_latitude: 45.4642
              station_longitude: 9.19
              station_name: Duomo
              trend_direction: declining
          growing_stations:
            - confidence_score: 0.71
              ebike_ratio: 0.4
              growth_rate: 0.042
              station_id: 318
              station_latitude: 45.4532
              station_longitude: 9.176
              station_name: Darsena
              trend_direction: growing
    TrendData:
      properties:
        station_id:
          anyOf:
            - type: integer
            - type: string
          title: Station Id
          description: Unique identifier for the bike sharing station
          examples:
            - 123
            - station_456
            - ST_789
        station_name:
          type: string
          minLength: 1
          title: Station Name
          description: Human-readable name of the station
          examples:
            - Central Station
            - Park Avenue
            - Main Square
        station_latitude:
          type: number
          maximum: 90
          minimum: -90
          title: Station Latitude
          description: Station latitude in decimal degrees
          examples:
            - 45.464664
            - 40.7128
            - 51.5074
        station_longitude:
          type: number
          maximum: 180
          minimum: -180
          title: Station Longitude
          description: Station longitude in decimal degrees
          examples:
            - 9.18854
            - -74.006
            - -0.1278
        trend_direction:
          type: string
          pattern: ^(growing|declining|stable)$
          title: Trend Direction
          description: Direction of the utilization trend over time
          examples:
            - growing
            - declining
            - stable
        growth_rate:
          type: number
          title: Growth Rate
          description: >-
            Weekly growth rate in utilization (positive = increasing demand,
            negative = decreasing demand)
          examples:
            - 0.15
            - -0.08
            - 0.23
        confidence_score:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence Score
          description: >-
            Statistical confidence score (R-squared) for the trend analysis
            (0-1, higher values indicate more reliable trends)
          examples:
            - 0.75
            - 0.82
            - 0.94
        ebike_ratio:
          type: number
          maximum: 1
          minimum: 0
          title: Ebike Ratio
          description: >-
            Average proportion of available bikes that are e-bikes at this
            station
          examples:
            - 0.32
            - 0.45
            - 0.67
      type: object
      required:
        - station_id
        - station_name
        - station_latitude
        - station_longitude
        - trend_direction
        - growth_rate
        - confidence_score
        - ebike_ratio
      title: TrendData
      description: Growth trend data for individual stations with utilization analysis.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Create one in the
        SWITCH Copilot under **Settings → API keys** (needs the API keys
        permission in your company), or with `POST /auth/api-keys`. The key is
        shown once, at creation.

````

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