StockTwits Search API

Search endpoints for finding symbols and users on StockTwits.

OpenAPI Specification

stocktwits-search-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: StockTwits Account Search API
  description: The StockTwits API provides access to the StockTwits social network for investors and traders. It allows developers to access streams of messages (twits), user profiles, trending symbols, and more. StockTwits is a social media platform designed for sharing ideas between investors, traders, and entrepreneurs.
  version: '2.0'
  contact:
    name: StockTwits
    url: https://stocktwits.com
  termsOfService: https://stocktwits.com/terms
  x-jentic-source-url: https://raw.githubusercontent.com/sophie-jentic/openapi-specs/refs/heads/import-jentic-pr-specs/stocktwits.com/stocktwits-api/2.0/openapi.json
servers:
- url: https://api.stocktwits.com/api/2
  description: StockTwits API v2 Production
security:
- {}
- oauth2: []
tags:
- name: Search
  description: Search endpoints for finding symbols and users on StockTwits.
paths:
  /search.json:
    get:
      operationId: search
      summary: Search
      description: Search for symbols and users on StockTwits.
      tags:
      - Search
      parameters:
      - name: q
        in: query
        required: true
        description: The search query (prefix match for symbols and usernames)
        schema:
          type: string
      responses:
        '200':
          description: Successful search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    $ref: '#/components/schemas/ResponseStatus'
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        type:
                          type: string
                          enum:
                          - symbol
                          - user
                        symbol:
                          type: string
                        title:
                          type: string
                        username:
                          type: string
  /search/symbols.json:
    get:
      operationId: searchSymbols
      summary: Search Symbols
      description: Search for symbols on StockTwits.
      tags:
      - Search
      parameters:
      - name: q
        in: query
        required: true
        description: The search query for symbol lookup
        schema:
          type: string
      responses:
        '200':
          description: Successful search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    $ref: '#/components/schemas/ResponseStatus'
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Symbol'
  /search/users.json:
    get:
      operationId: searchUsers
      summary: Search Users
      description: Search for users on StockTwits.
      tags:
      - Search
      parameters:
      - name: q
        in: query
        required: true
        description: The search query for user lookup
        schema:
          type: string
      responses:
        '200':
          description: Successful search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    $ref: '#/components/schemas/ResponseStatus'
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/User'
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: integer
          description: Unique user ID
        username:
          type: string
          description: The user's username
        name:
          type: string
          description: The user's display name
        avatar_url:
          type: string
          format: uri
          description: URL to the user's avatar image
        avatar_url_ssl:
          type: string
          format: uri
          description: HTTPS URL to the user's avatar image
        join_date:
          type: string
          format: date-time
          description: Date the user joined StockTwits
        official:
          type: boolean
          description: Whether the user is an official/verified account
        followers:
          type: integer
          description: Number of followers
        following:
          type: integer
          description: Number of users being followed
        ideas:
          type: integer
          description: Number of messages posted
        watchlist_stocks_count:
          type: integer
          description: Number of stocks in the user's watchlist
        like_count:
          type: integer
          description: Number of likes received
        classification:
          type: array
          items:
            type: string
          description: User classification tags (e.g. suggested, official)
    Symbol:
      type: object
      properties:
        id:
          type: integer
          description: Unique symbol ID
        symbol:
          type: string
          description: The ticker symbol (e.g. AAPL)
        title:
          type: string
          description: The full company/asset name
        aliases:
          type: array
          items:
            type: string
          description: Alternative names or aliases
        is_following:
          type: boolean
          description: Whether the authenticated user is following this symbol
        has_pricing:
          type: boolean
          description: Whether pricing data is available for this symbol
        watchlist_count:
          type: integer
          description: Number of users who have this symbol in their watchlist
    ResponseStatus:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code (200 for success)
  securitySchemes:
    oauth2:
      type: oauth2
      description: StockTwits uses OAuth 2.0 for authentication. Some endpoints are available without authentication using just an access_token query parameter.
      flows:
        authorizationCode:
          authorizationUrl: https://api.stocktwits.com/api/2/oauth/authorize
          tokenUrl: https://api.stocktwits.com/api/2/oauth/token
          scopes:
            read: Read access to public data
            publish_messages: Create and interact with messages
            publish_watch_lists: Create and manage watchlists
            follow_users: Follow and unfollow users
            follow_stocks: Follow and unfollow stocks
    accessToken:
      type: apiKey
      in: query
      name: access_token
      description: Access token passed as a query parameter. Can be an application-level token for public endpoints or a user-level OAuth token for authenticated endpoints.
externalDocs:
  description: StockTwits API Documentation
  url: https://api.stocktwits.com/developers/docs/api