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

# Securities search

> Search for US stocks by ticker symbol or company name. Returns a list of matching securities ordered by relevance.

<ResponseExample>
  ```json Response example for ?query=Bank of America theme={null}
  {
      "data": {
          "data": [
              {
                  "ticker": "BAC",
                  "name": "Bank Of America",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpN",
                  "name": "Bank Of America Pref LL ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BMLpJ",
                  "name": "Bank Of America Pref 4 ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpB",
                  "name": "Bank Of America Pref GG ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpQ",
                  "name": "Bank Of America Pref QQ ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BMLpG",
                  "name": "Bank Of America Pref 1 ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpO",
                  "name": "Bank Of America Pref NN ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpL",
                  "name": "Bank Of America Pref L",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpP",
                  "name": "Bank Of America Pref PP ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpS",
                  "name": "Bank Of America Pref SS ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BMLpL",
                  "name": "Bank Of America Pref 5 ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpM",
                  "name": "Bank Of America Pref KK ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpE",
                  "name": "Bank Of America Pref E ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BMLpH",
                  "name": "Bank Of America Pref 2 ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              },
              {
                  "ticker": "BACpK",
                  "name": "Bank Of America Pref HH ADR",
                  "security_tag": "stock",
                  "exchange": "NYSE"
              }
          ]
      },
      "status_code": 0,
      "status_msg": "success"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml reference/securities/securities.yaml GET /securities/search
openapi: 3.1.0
info:
  title: Securities master reference
  description: >-
    Query general information about US stocks, including company name, sector,
    industry, market cap, financials, key trading statistics
  version: 1.0.0
servers:
  - url: https://openapi.ainvest.com/open
    description: Production environment
security:
  - bearerAuth: []
tags:
  - name: Securities
    description: Provides reference information about US stocks
    externalDocs:
      url: https://docs.ainvest.com/reference/securities
paths:
  /securities/search:
    get:
      tags:
        - Securities
      summary: Search for US stocks by ticker or company name
      description: >-
        Search for US stocks by ticker symbol or company name. Returns a list of
        matching securities ordered by relevance.
      operationId: searchSecurities
      parameters:
        - name: query
          in: query
          required: true
          description: >-
            Search query, can be a stock ticker symbol or part of the company
            name
          schema:
            type: string
      responses:
        '200':
          description: Successful response in standard envelope.
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-04/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            ticker:
                              type: string
                              description: >-
                                US stock market ticker symbol, e.g. AAPL, TSLA,
                                etc.
                            name:
                              type: string
                              description: Full name of the security or the company
                            security_tag:
                              type: string
                              description: Security type, e.g. `stock`, `etf`, etc.
                            exchange:
                              type: string
                              description: >-
                                Stock exchange where the security is listed,
                                e.g. `NASDAQ`, `NYSE`, etc.
                  status_code:
                    type: number
                    description: Status code, `0` for success
                  status_msg:
                    type: string
                    description: Status message, `success` for success
        '400':
          description: Validation error, i.e. no stocks found or parameter is not specified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                status_code: 4012
                status_msg: Invalid param
components:
  schemas:
    Error:
      type: object
      properties:
        status_code:
          type: integer
          description: Business status code
        status_msg:
          type: string
          description: Error message
      required:
        - status_code
        - status_msg
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your key. [Get the key
        here](https://www.ainvest.com/business/developer-manage/)

````