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

# List Competitive Sets

> Retrieves a list of [comp sets](#response-attributes-name) the current user has access to within the given account.



## OpenAPI

````yaml /openapi/v1/schema.json get /accounts/{account_id}/comp_sets
openapi: 3.0.3
info:
  title: ApartmentIQ API
  version: 1.14.0
  termsOfService: https://www.getapartmentiq.com/terms
  x-logo:
    url: https://developers.apartmentiq.io/logo.svg
    altText: ApartmentIQ
  description: >-
    ApartmentIQ API providing Accounts, Market Surveys, Markets, Market
    Narratives, and Forecasts endpoints to access accounts, comp sets, market
    survey tables, units, floorplans, and market-based property data. See
    documentation pages for authentication, errors, and rate limits.
servers:
  - url: https://data.apartmentiq.io/apartmentiq/api/v1
security:
  - oauth2: []
tags:
  - name: Accounts
    description: >-
      Endpoints for listing the ApartmentIQ accounts accessible to the
      authenticated user.
  - name: Market Surveys
    description: >-
      Market Survey endpoints can be used to access data related to your market
      surveys within ApartmentIQ. The ApartmentIQ API refers to the list of
      properties within your market surveys as a comp set, or competitive set.
      In the rest of this document, comp set and competitive set will be used
      interchangeably.
  - name: Markets
    description: Endpoints used to access market data.
  - name: Bulk Data Export
    description: >-
      Endpoints for requesting and downloading historical property data through
      asynchronous batch jobs. Submit a job request, monitor its status, and
      download results when ready.
  - name: Forecasts
    description: >-
      Endpoints for retrieving modeled future time-series forecast data for
      geographic boundaries and properties. Forecast data spans from the
      beginning of the current month up to 5 years in the future. Requires
      Explore Pro access.
paths:
  /accounts/{account_id}/comp_sets:
    get:
      tags:
        - Market Surveys
      summary: List Competitive Sets
      description: >-
        Retrieves a list of [comp sets](#response-attributes-name) the current
        user has access to within the given account.
      operationId: getCompSets
      parameters:
        - name: account_id
          in: path
          description: >-
            ID of the ApartmentIQ account to get the list of [comp
            sets](#model/compset) for.
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: >-
            A Map with a `data` attribute that contains an array of all [comp
            sets](#response-attributes-name) the user has access to in the given
            account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CompSet'
        '400':
          description: The request was invalid or malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid Parameter:
                  value:
                    error: Invalid parameter
                    message: account_id must be an integer
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
                message: Missing or invalid bearer token
        '403':
          description: The user does not have permission to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Forbidden
                message: You do not have permission to access this resource
        '404':
          description: The requested resource was not found.
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          description: >-
            An unexpected error occurred while processing the request. Our team
            is investigating.
components:
  schemas:
    CompSet:
      type: object
      required:
        - id
        - type
        - attributes
      properties:
        id:
          type: string
          description: ID of the comp set.
          example: '11848667'
        type:
          type: string
          description: Type of data returned in the response.
          example: comp_set
        attributes:
          type: object
          description: Container for comp set attributes and metadata.
          properties:
            name:
              type: string
              description: Name of the comp set.
              example: Bowery Bayside Market
            min_floorplan:
              type: integer
              description: >-
                Minimum floorplan size to include in the comp set data, where 0
                is a studio and 5 is a 5 bedroom unit.
              example: 0
            max_floorplan:
              type: integer
              description: >-
                Maximum floorplan size to include in the comp set data, where 0
                is a studio and 5 is a 5 bedroom unit.
              example: 2
            image:
              type: string
              description: URL of the image representing the comp set.
              example: >-
                https://apartmentiq-assets.rentable.co/images/accounts/1111/comp-sets/11848667.jpg
            market_survey:
              type: boolean
              description: Whether the comp set is a Market Survey or a Research Report.
              example: true
            category:
              type: string
              description: >-
                The comp set category: market_survey, research_report, or
                legacy_research_report.
              example: market_survey
            custom_property:
              type: boolean
              description: Whether or not the comp set contains custom property.
              example: false
            value_add:
              type: boolean
              description: >-
                Whether or not the comp set is set to include value add
                properties.
              example: false
            addresses:
              type: array
              description: List of street addresses of subject properties in the comp set.
              items:
                type: string
              example:
                - 6301 S Westshore Blvd Tampa FL 33616
            owned_property_addresses:
              type: array
              description: >-
                List of street addresses of subject properties in the comp set
                broken up by part
              items:
                type: object
                properties:
                  id:
                    type: integer
                  address:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  zip_code:
                    type: string
              example:
                - id: 99000673
                  address: 6301 S Westshore Blvd
                  city: Tampa
                  state: FL
                  zip_code: '33616'
            subject_property_ids:
              type: array
              description: List of IDs of subject properties in the comp set.
              items:
                type: string
              example:
                - '99000673'
            created_at:
              type: string
              description: Date the comp set was created, in ISO 8601 format.
              example: '2024-02-13T12:00:00Z'
              format: date-time
            show_recommendations_link:
              type: boolean
              description: Indicates if the market survey has recommendations enabled.
              example: true
    Error:
      type: object
      description: >-
        Error response payload. Most errors include error and optional message;
        some validation responses include errors; quota responses include quota
        fields.
      properties:
        error:
          type: string
          description: Short error message
          example: Invalid parameter
        message:
          type: string
          description: Optional detailed message
          example: account_id is required
        errors:
          type: array
          description: Optional list of validation errors.
          items:
            type: string
        quota_limit:
          type: integer
          description: >-
            Quota limit that applied to the request when an account quota was
            exceeded.
        quota_usage:
          type: integer
          description: Current quota usage when an account quota was exceeded.
  responses:
    RateLimitExceeded:
      description: >-
        Rate limit exceeded. Inspect the rate limit headers and wait before
        retrying.
      headers:
        X-RateLimit-Limit:
          description: The limit that applied to the request.
          schema:
            type: string
        X-RateLimit-Reset-After:
          description: The rate limit window length, in seconds.
          schema:
            type: string
        X-RateLimit-Reset:
          description: Unix timestamp when the current window resets.
          schema:
            type: string
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: string
      content:
        text/plain:
          schema:
            type: string
          example: |
            You have exceeded the rate limit for this API.
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Trial API quota limit exceeded
            quota_limit: 5000
            quota_usage: 5001
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        Enter a Bearer token obtained via the OAuth client credentials flow or
        from the Access Tokens tab in your account settings.
      flows:
        clientCredentials:
          tokenUrl: https://data.apartmentiq.io/oauth/token
          scopes: {}

````