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

# Add filters to Threads advanced search

> Add filters from a predefined list to your Threads search.



## OpenAPI

````yaml /api-v2/api-v2.yaml post /threadsAdvancedSearch
openapi: 3.1.0
info:
  version: '2'
  title: CreatorDB Headless APIService
  description: >-
    Generated from swaggerComponentIndex.json by core-types-json-schema
    (https://github.com/grantila/core-types-json-schema). Use OpenAPI 3.1.0
    version with direct JSON Schema support
  termsOfService: https://www.creatordb.app
  contact:
    name: CreatorDB
    url: https://www.creatordb.app
    email: support@creatordb.app
  license:
    url: http://www.apache.org/licenses/LICENSE-2.0.html
    name: Apache 2.0
  x-id: indexForSwagger.yaml
servers:
  - url: https://dev.creatordb.app/v2
    description: CreatorDB API Endpoint - prod version
security: []
tags:
  - name: General Operations
    description: >-
      General-purpose endpoints such as API status, content retrieval, and
      cross-platform operations
  - name: YouTube
    description: >-
      YouTube creator data endpoints including basic metrics, historical data,
      and detailed analytics
  - name: Instagram
    description: >-
      Instagram creator data endpoints with metrics and advanced search
      capabilities
  - name: TikTok
    description: >-
      TikTok creator data endpoints with metrics and advanced search
      functionality
  - name: Threads
    description: Threads creator data endpoints with basic metrics and historical data
  - name: Facebook
    description: Facebook creator data endpoints with metrics and search capabilities
  - name: Topic
    description: Topic-based analysis and reporting endpoints for content categorization
  - name: Brand
    description: Brand analysis endpoints including sponsor search and brand reports
  - name: Niches
    description: Niche-related endpoints for content category analysis and related searches
paths:
  /threadsAdvancedSearch:
    post:
      tags:
        - Threads
      summary: Add filters to Threads advanced search
      description: Add filters from a predefined list to your Threads search.
      operationId: threadsAdvancedSearch
      parameters:
        - name: apiId
          in: header
          description: ''
          required: true
          schema:
            type: string
            examples:
              - LE6DPZQkR3TQShxofXoD2j8qCBu1-f0jti665m1t50dwDD12W
          examples:
            default:
              value: LE6DPZQkR3TQShxofXoD2j8qCBu1-f0jti665m1t50dwDD12W
      requestBody:
        description: >-
          search parameters with filters, available filterKeys: threadsId
          ,threadsName ,avatar ,description ,hashtags ,followers ,gRateFollowers
          ,gRateThreadsTabPosts ,gRateThreadsTabAvgReplies
          ,gRateThreadsTabAvgLikes ,gRateRepliesTabPosts
          ,gRateRepliesTabAvgReplies ,gRateRepliesTabAvgLikes.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchParams'
            examples:
              default:
                value:
                  maxResults: 3
                  sortBy: followers
                  offset: 0
                  desc: true
                  filters:
                    - filterKey: followers
                      op: '>'
                      value: 10000
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
                  quotaUsed:
                    type: number
                    description: API credits that were used to make this call.
                  quotaUsedTotal:
                    type: number
                    description: Total API credits used since the last billing cycle.
                  remainingPlanCredit:
                    type: number
                    description: >-
                      The number of remaining free API credits that come with
                      your subscription plan. These API credits are renewed
                      every billing cycle.
                  remainingPrepurchasedCredit:
                    type: number
                    description: >-
                      The number of remaining extra purchased API credits. These
                      API credits do not expire until used.
                  timestamp:
                    type: number
                    description: >-
                      Unix timestamp of the call request that the server
                      received.
                  error:
                    type: string
                    description: Errors that occurred during the API call.
                  success:
                    type: boolean
                    description: It is TRUE when the call is successful.
              examples:
                default:
                  value:
                    data:
                      - instagram
                      - neymarjr
                      - selenagomez
                    quotaUsed: 1
                    quotaUsedTotal: 6025
                    remainingPlanCredit: 993975
                    remainingPrepurchasedCredit: 0
                    timestamp: 1755503516450
                    error: ''
                    success: true
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
                  quotaUsed:
                    type: number
                    description: API credits that were used to make this call.
                  quotaUsedTotal:
                    type: number
                    description: Total API credits used since the last billing cycle.
                  remainingPlanCredit:
                    type: number
                    description: >-
                      The number of remaining free API credits that come with
                      your subscription plan. These API credits are renewed
                      every billing cycle.
                  remainingPrepurchasedCredit:
                    type: number
                    description: >-
                      The number of remaining extra purchased API credits. These
                      API credits do not expire until used.
                  timestamp:
                    type: number
                    description: >-
                      Unix timestamp of the call request that the server
                      received.
                  error:
                    type: string
                    description: Errors that occurred during the API call.
                  success:
                    type: boolean
                    description: It is TRUE when the call is successful.
              examples:
                default:
                  value:
                    data: null
                    quotaUsed: 0
                    quotaUsedTotal: 0
                    remainingPlanCredit: 0
                    remainingPrepurchasedCredit: 0
                    timestamp: 1755503514676
                    error: AdvancedSearchSortByNotExistOrInvalid
                    success: false
      servers:
        - url: https://dev.creatordb.app/v2
          description: CreatorDB API Endpoint - prod version
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            curl --request POST \
              --url https://dev.creatordb.app/v2/threadsAdvancedSearch \
              --header 'Accept: application/json' \
              --header 'Content-Type: application/json' \
              --header 'apiId: LE6DPZQkR3TQShxofXoD2j8qCBu1-f0jti665m1t50dwDD12W' \
              --data '{
              "maxResults": 3,
              "sortBy": "followers",
              "offset": 0,
              "desc": true,
              "filters": [
                {
                  "filterKey": "followers",
                  "op": ">",
                  "value": 10000
                }
              ]
            }'             
components:
  schemas:
    SearchParams:
      type: object
      additionalProperties: false
      properties:
        offset:
          type: number
        maxResults:
          type: number
        sortBy:
          type: string
        desc:
          type: boolean
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
      required:
        - offset
        - maxResults
        - sortBy
        - desc
        - filters
    Filter:
      type: object
      additionalProperties: false
      properties:
        filterKey:
          type: string
        op:
          $ref: '#/components/schemas/FilterOperator'
        value:
          $ref: '#/components/schemas/FilterValueType'
      required:
        - filterKey
        - op
        - value
    FilterOperator:
      type: string
      enum:
        - '>'
        - <
        - '='
        - in
      description: A filter operator.
    FilterValueType:
      description: A filter component.
      anyOf:
        - type: number
        - type: boolean
        - type: string
        - type: array
          items:
            type: string

````