FactSet Search Answers

The FactSet Search Answers API provides answers to search queries, reflecting the data shown within FactSet Search Answers.

OpenAPI Specification

search-answers-openapi-original.yml Raw ↑
openapi: 3.0.2
info:
  version: 1.1.0
  title: FactSet Search Answers API
  contact:
    name: FactSet Search Team
    email: [email protected]
  description: >-
    The FactSet Search Answers API provides answers to search queries,
    reflecting the data shown within FactSet Search Answers, and allowing you to
    easily add financial data to your widgets, lookups, bots, and assistants.
    The API understands a fixed amount of search terms and returns structured
    data from FactSet’s many data sources. Possible answers include Price of a
    Company, Top 10 Year-to-Date Gainers, Revenue per Passenger Mile, and many
    more.
servers:
  - url: https://api.factset.com
paths:
  /search/answers/v1/data:
    get:
      summary: Fetch FactSet answer in data format
      tags:
        - Search
      description: >-
        Returns an answer to the specified query (if a valid answer exists).
        Returns the answer data only (as JSON), without any markup information.
      operationId: searchForDataAnswer
      parameters:
        - $ref: '#/components/parameters/Query'
        - $ref: '#/components/parameters/ConsumingApplication'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataAnswerSuccessResponse'
        '400':
          description: Missing or empty query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
        '500':
          description: Unhandled error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
  /search/answers/v1/adaptive-card:
    get:
      summary: Fetch FactSet answer in Adaptive Card format
      tags:
        - Search
      description: >-
        Returns an answer to the specified query (if valid answer exists) in the
        Adaptive Card format (https://adaptivecards.io/).
      operationId: searchForAdaptiveCardAnswer
      parameters:
        - $ref: '#/components/parameters/Query'
        - $ref: '#/components/parameters/IncludeThumbnail'
        - $ref: '#/components/parameters/DisableNoAnswerResponses'
        - $ref: '#/components/parameters/Theme'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdaptiveCardAnswerSuccessResponse'
        '400':
          description: Missing or empty query.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
        '500':
          description: Unhandled error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerFailureResponse'
security:
  - Basic: []
components:
  securitySchemes:
    Basic:
      type: http
      scheme: basic
  parameters:
    Query:
      name: query
      in: query
      description: Query for desired answer (e.g., "fds price")
      required: true
      schema:
        type: string
    IncludeThumbnail:
      name: includeThumbnail
      in: query
      description: Includes thumbnail of Adaptive Card in response
      required: false
      schema:
        type: boolean
        default: false
    DisableNoAnswerResponses:
      name: disableNoAnswerResponses
      in: query
      description: Disables no-result answer responses (no-results and answer without data)
      required: false
      schema:
        type: boolean
        default: true
    Theme:
      name: theme
      in: query
      description: Theme for desired answer (e.g., "Light", "Dark")
      required: false
      schema:
        type: string
        default: Light
    ConsumingApplication:
      name: consumingApplication
      in: query
      description: Name of application consuming the API (used for analytics purposes)
      required: false
      schema:
        type: string
        default: Developer Portal
  schemas:
    DataAnswerSuccessResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/DataAnswerData'
    DataAnswerData:
      oneOf:
        - $ref: '#/components/schemas/LinkTextBlockAnswer'
        - $ref: '#/components/schemas/TextBlockFootingAnswer'
        - $ref: '#/components/schemas/PercentChangeLabelAnswer'
        - $ref: '#/components/schemas/ValueChangeDateLabelAnswer'
        - $ref: '#/components/schemas/RankedTableAnswer'
        - $ref: '#/components/schemas/TableAnswer'
        - $ref: '#/components/schemas/TableTableAnswer'
        - $ref: '#/components/schemas/ValueLabelAnswer'
        - $ref: '#/components/schemas/ValueLabelDateAnswer'
        - $ref: '#/components/schemas/ColoredValueLabelDateAnswer'
        - $ref: '#/components/schemas/ValueLabelDateTextBlockAnswer'
        - $ref: '#/components/schemas/ValueLabelDateDataPairListAnswer'
        - $ref: '#/components/schemas/LabelValueChangeLabelValueChangeAnswer'
        - $ref: '#/components/schemas/AnswerWithoutData'
        - $ref: '#/components/schemas/NoAnswersFound'
      discriminator:
        propertyName: template
        mapping:
          LinkTextBlockTemplate: '#/components/schemas/LinkTextBlockAnswer'
          TextBlockFootingTemplate: '#/components/schemas/TextBlockFootingAnswer'
          PercentChangeLabelTemplate: '#/components/schemas/PercentChangeLabelAnswer'
          ValueChangeDateLabelTemplate: '#/components/schemas/ValueChangeDateLabelAnswer'
          RankedTableTemplate: '#/components/schemas/RankedTableAnswer'
          TableTemplate: '#/components/schemas/TableAnswer'
          TableTableTemplate: '#/components/schemas/TableTableAnswer'
          ValueLabelTemplate: '#/components/schemas/ValueLabelAnswer'
          ValueLabelDateTemplate: '#/components/schemas/ValueLabelDateAnswer'
          ColoredValueLabelDateTemplate: '#/components/schemas/ColoredValueLabelDateAnswer'
          ValueLabelDateTextBlockTemplate: '#/components/schemas/ValueLabelDateTextBlockAnswer'
          ValueLabelDateDataPairListTemplate: '#/components/schemas/ValueLabelDateDataPairListAnswer'
          LabelValueChangeLabelValueChangeTemplate: '#/components/schemas/LabelValueChangeLabelValueChangeAnswer'
          AnswerWithoutDataTemplate: '#/components/schemas/AnswerWithoutData'
          NoAnswerTemplate: '#/components/schemas/NoAnswersFound'
    AnswerFailureResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Error:
      type: object
      required:
        - id
        - code
        - title
      properties:
        id:
          type: string
        code:
          type: string
        title:
          type: string
        links:
          $ref: '#/components/schemas/ErrorLink'
        detail:
          type: string
        source:
          $ref: '#/components/schemas/ErrorSource'
    ErrorLink:
      type: object
      required:
        - about
      properties:
        about:
          type: string
    ErrorSource:
      type: object
      properties:
        pointer:
          type: string
        parameter:
          type: string
    DataAnswer:
      type: object
      required:
        - template
      properties:
        template:
          type: string
    AnswerWithTitle:
      allOf:
        - $ref: '#/components/schemas/DataAnswer'
        - type: object
          required:
            - title
          properties:
            title:
              type: string
    NoAnswersBase:
      allOf:
        - $ref: '#/components/schemas/DataAnswer'
        - type: object
          required:
            - message
          properties:
            message:
              type: string
    AnswerWithoutData:
      allOf:
        - $ref: '#/components/schemas/NoAnswersBase'
        - type: object
          required:
            - title
            - templateData
          properties:
            title:
              type: string
            templateData:
              type: object
              properties:
                fdc3Context:
                  $ref: '#/components/schemas/Fdc3Context'
    NoAnswersFound:
      allOf:
        - $ref: '#/components/schemas/NoAnswersBase'
        - type: object
          required:
            - querySuggestions
          properties:
            querySuggestions:
              type: array
              items:
                type: string
    Fdc3Country:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
        name:
          type: string
        id:
          $ref: '#/components/schemas/CountryID'
    Fdc3Instrument:
      type: object
      required:
        - type
        - name
      properties:
        type:
          type: string
        name:
          type: string
        exchangeMic:
          type: string
        exchangeMicFds:
          type: string
        id:
          $ref: '#/components/schemas/InstrumentID'
    Fdc3Context:
      oneOf:
        - $ref: '#/components/schemas/Fdc3Instrument'
        - $ref: '#/components/schemas/Fdc3Country'
      discriminator:
        propertyName: type
        mapping:
          fdc3.instrument: '#/components/schemas/Fdc3Instrument'
          fdc3.country: '#/components/schemas/Fdc3Country'
    CountryID:
      type: object
      properties:
        ISOALPHA2:
          type: string
    InstrumentID:
      type: object
      properties:
        BBG:
          type: string
        CUSIP:
          type: string
        FDS_ID:
          type: string
        FDS_TICKER_REGION:
          type: string
        FDS_TICKER_EXCHANGE:
          type: string
        FIGI:
          type: string
        ISIN:
          type: string
        PERMID:
          type: string
        RIC:
          type: string
        SEDOL:
          type: string
        ticker:
          type: string
    Template:
      type: object
      required:
        - headline
      properties:
        headline:
          type: string
        footer:
          type: string
        fdc3Context:
          $ref: '#/components/schemas/Fdc3Context'
    TemplateWithLinks:
      allOf:
        - $ref: '#/components/schemas/Template'
        - type: object
          required:
            - headline
          properties:
            applicationLinks:
              type: array
              items:
                $ref: '#/components/schemas/ApplicationLink'
    LinkTextBlockAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/LinkTextBlockTemplateData'
    TextBlockFootingAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/TextBlockFootingTemplateData'
    PercentChangeLabelAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/PercentChangeLabelTemplateData'
    ValueChangeDateLabelAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ValueChangeDateLabelTemplateData'
    RankedTableAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/RankedTableTemplateData'
    TableAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/TableTemplateData'
    TableTableAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/TableTableTemplateData'
    ValueLabelAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ValueLabelTemplateData'
    ValueLabelDateAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ValueLabelDateTemplateData'
    ColoredValueLabelDateAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ColoredValueLabelDateTemplateData'
    ValueLabelDateTextBlockAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ValueLabelDateTextBlockTemplateData'
    ValueLabelDateDataPairListAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: '#/components/schemas/ValueLabelDateDataPairListTemplateData'
    LabelValueChangeLabelValueChangeAnswer:
      allOf:
        - $ref: '#/components/schemas/AnswerWithTitle'
        - type: object
          required:
            - templateData
          properties:
            templateData:
              $ref: >-
                #/components/schemas/LabelValueChangeLabelValueChangeTemplateData
    LinkTextBlockTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            link:
              type: string
            text:
              type: string
    TextBlockFootingTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            body:
              type: string
            footing:
              $ref: '#/components/schemas/TitledTextBlock'
    PercentChangeLabelTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            percentChange:
              $ref: '#/components/schemas/PercentChange'
            label:
              type: string
    ValueChangeDateLabelTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            valueChange:
              $ref: '#/components/schemas/ValueChange'
            date:
              type: string
            label:
              type: string
    RankedTableTemplateData:
      allOf:
        - $ref: '#/components/schemas/Template'
        - type: object
          properties:
            table:
              $ref: '#/components/schemas/RankedTable'
    TableTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            table:
              $ref: '#/components/schemas/Table'
    TableTableTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            table1:
              $ref: '#/components/schemas/Table'
            table2:
              $ref: '#/components/schemas/Table'
    ValueLabelTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            label:
              type: string
    ValueLabelDateTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            label:
              type: string
            date:
              type: string
    ColoredValueLabelDateTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              $ref: '#/components/schemas/ColoredValue'
            label:
              type: string
            date:
              type: string
    ValueLabelDateTextBlockTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            label:
              type: string
            date:
              type: string
            text:
              type: string
    ValueLabelDateDataPairListTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            label:
              type: string
            date:
              type: string
            list:
              type: array
              items:
                $ref: '#/components/schemas/DataPair'
    LabelValueChangeLabelValueChangeTemplateData:
      allOf:
        - $ref: '#/components/schemas/TemplateWithLinks'
        - type: object
          properties:
            value:
              type: string
            label:
              type: string
            valueChange:
              $ref: '#/components/schemas/ValueChange'
            value2:
              type: string
            label2:
              type: string
    TitledTextBlock:
      type: object
      properties:
        title:
          type: string
        content:
          type: string
    ValueChange:
      type: object
      properties:
        absoluteChange:
          type: string
        percentageChange:
          type: string
        color:
          $ref: '#/components/schemas/ChangeColor'
    PercentChange:
      type: object
      properties:
        change:
          type: string
        color:
          $ref: '#/components/schemas/ChangeColor'
    ChangeColor:
      type: string
      enum:
        - colorNeutral
        - colorPositive
        - colorNegative
    ColoredValue:
      type: object
      properties:
        text:
          type: string
        color:
          $ref: '#/components/schemas/ValueColor'
    ValueColor:
      type: string
      enum:
        - colorNone
        - colorBuy
        - colorHold
        - colorSell
        - colorOverweight
        - colorUnderweight
    Table:
      type: object
      required:
        - tableRows
      properties:
        tableHeaders:
          type: array
          items:
            type: string
        tableRows:
          type: array
          items:
            type: array
            items:
              type: string
        tableFooters:
          type: array
          items:
            type: string
    RankedTable:
      type: object
      required:
        - rows
      properties:
        headers:
          type: array
          items:
            type: string
        rows:
          type: array
          items:
            $ref: '#/components/schemas/RankedTableRow'
    RankedTableRow:
      type: object
      required:
        - rank
      properties:
        rank:
          type: number
        entity:
          $ref: '#/components/schemas/RankedTableEntity'
        applicationLink:
          $ref: '#/components/schemas/ApplicationLink'
        additionalData:
          type: array
          items:
            type: string
    RankedTableEntity:
      type: object
      properties:
        name:
          type: string
        identifier:
          type: string
    DataPair:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type: string
        label:
          type: string
    ApplicationLink:
      type: object
      required:
        - name
        - webLink
      properties:
        name:
          type: string
        workstationLink:
          type: string
        webLink:
          type: string
    AdaptiveCardAnswerSuccessResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AdaptiveCardDataItem'
    AdaptiveCardDataItem:
      oneOf:
        - $ref: '#/components/schemas/AdaptiveCard'
        - $ref: '#/components/schemas/AdaptiveCardWithThumbnail'
    AdaptiveCardWithThumbnail:
      type: object
      properties:
        adaptiveCard:
          $ref: '#/components/schemas/AdaptiveCard'
        thumbnail:
          $ref: '#/components/schemas/ThumbnailCard'
    AdaptiveCard:
      type: object
      description: >-
        JSON that matches [Adaptive Card](https://adaptivecards.io/explorer/)
        format.
    ThumbnailCard:
      type: object
      description: >-
        JSON that matches [Thumbnail
        Card](https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#thumbnail-card)
        format.
      nullable: true
tags:
  - name: Search