# Google Analytics API . management . segments

## Instance Methods

Lists advanced segments to which the user has access.

### Method Details

`list(max_results=None, start_index=None)`

    Lists advanced segments to which the user has access.

    Args:
      max_results: integer, The maximum number of advanced segments to include in this response.
      start_index: integer, An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

    Returns:
      An object of the form:

        { # An advanced segment collection lists Analytics advanced segments that the user has access to. Each resource in the collection corresponds to a single Analytics advanced segment.
        "username": "A String", # Email ID of the authenticated user
        "kind": "analytics#segments", # Collection type for advanced segments.
        "items": [ # A list of advanced segments.
          { # JSON template for an Analytics advanced segment.
            "definition": "A String", # Advanced segment definition.
            "kind": "analytics#segment", # Resource type for Analytics advanced segment.
            "segmentId": "A String", # Segment ID. Can be used with the 'segment' parameter in Data Feed.
            "created": "A String", # Time the advanced segment was created.
            "updated": "A String", # Time the advanced segment was last modified.
            "id": "A String", # Advanced segment ID.
            "selfLink": "A String", # Link for this advanced segment.
            "name": "A String", # Advanced segment name.
          },
        ],
        "itemsPerPage": 42, # The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
        "previousLink": "A String", # Link to previous page for this advanced segment collection.
        "startIndex": 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
        "nextLink": "A String", # Link to next page for this advanced segment collection.
        "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
      }