Algorand search API

The search API from Algorand — 6 operation(s) for search.

OpenAPI Specification

algorand-search-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  contact:
    email: contact@algorand.com
    name: algorand
    url: https://www.algorand.com/get-in-touch/contact
  description: API endpoint for algod operations.
  title: Algod REST API. common search API
  version: 0.0.1
servers:
- url: http://localhost/
- url: https://localhost/
security:
- api_key: []
tags:
- name: search
paths:
  /v2/accounts:
    get:
      description: Search for accounts.
      operationId: searchForAccounts
      parameters:
      - description: Asset ID
        in: query
        name: asset-id
        schema:
          type: integer
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      - description: Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
        in: query
        name: currency-greater-than
        schema:
          type: integer
      - description: Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
        in: query
        name: include-all
        schema:
          type: boolean
      - description: Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.
        explode: false
        in: query
        name: exclude
        schema:
          items:
            enum:
            - all
            - assets
            - created-assets
            - apps-local-state
            - created-apps
            - none
            type: string
          type: array
        style: form
      - description: Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
        in: query
        name: currency-less-than
        schema:
          type: integer
      - description: Include accounts configured to use this spending key.
        in: query
        name: auth-addr
        schema:
          type: string
          x-algorand-format: Address
        x-algorand-format: Address
      - description: Include results for the specified round. For performance reasons, this parameter may be disabled on some configurations. Using application-id or asset-id filters will return both creator and opt-in accounts. Filtering by include-all will return creator and opt-in accounts for deleted assets and accounts. Non-opt-in managers are not included in the results when asset-id is used.
        in: query
        name: round
        schema:
          type: integer
      - description: Application ID
        in: query
        name: application-id
        schema:
          type: integer
      - description: When this is set to true, return only accounts whose participation status is currently online.
        in: query
        name: online-only
        schema:
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  accounts:
                    items:
                      $ref: '#/components/schemas/Account'
                    type: array
                  current-round:
                    description: Round at which the results were computed.
                    type: integer
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                required:
                - accounts
                - current-round
                type: object
          description: (empty)
        '400':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      tags:
      - search
  /v2/applications:
    get:
      description: Search for applications
      operationId: searchForApplications
      parameters:
      - description: Application ID
        in: query
        name: application-id
        schema:
          type: integer
      - description: Filter just applications with the given creator address.
        in: query
        name: creator
        schema:
          type: string
      - description: Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
        in: query
        name: include-all
        schema:
          type: boolean
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  applications:
                    items:
                      $ref: '#/components/schemas/Application'
                    type: array
                  current-round:
                    description: Round at which the results were computed.
                    type: integer
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                required:
                - applications
                - current-round
                type: object
          description: (empty)
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      tags:
      - search
  /v2/applications/{application-id}/boxes:
    get:
      description: Given an application ID, returns the box names of that application sorted lexicographically.
      operationId: searchForApplicationBoxes
      parameters:
      - in: path
        name: application-id
        required: true
        schema:
          type: integer
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  application-id:
                    description: \[appidx\] application index.
                    type: integer
                  boxes:
                    items:
                      $ref: '#/components/schemas/BoxDescriptor'
                    type: array
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                required:
                - application-id
                - boxes
                type: object
          description: Box names of an application
        '400':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '404':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      summary: Get box names for a given application.
      tags:
      - search
  /v2/assets:
    get:
      description: Search for assets.
      operationId: searchForAssets
      parameters:
      - description: Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
        in: query
        name: include-all
        schema:
          type: boolean
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      - description: Filter just assets with the given creator address.
        in: query
        name: creator
        schema:
          type: string
      - description: Filter just assets with the given name.
        in: query
        name: name
        schema:
          type: string
      - description: Filter just assets with the given unit.
        in: query
        name: unit
        schema:
          type: string
      - description: Asset ID
        in: query
        name: asset-id
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  assets:
                    items:
                      $ref: '#/components/schemas/Asset'
                    type: array
                  current-round:
                    description: Round at which the results were computed.
                    type: integer
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                required:
                - assets
                - current-round
                type: object
          description: (empty)
        '400':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      tags:
      - search
  /v2/block-headers:
    get:
      description: Search for block headers. Block headers are returned in ascending round order. Transactions are not included in the output.
      operationId: searchForBlockHeaders
      parameters:
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      - description: Include results at or after the specified min-round.
        in: query
        name: min-round
        schema:
          type: integer
      - description: Include results at or before the specified max-round.
        in: query
        name: max-round
        schema:
          type: integer
      - description: Include results before the given time. Must be an RFC 3339 formatted string.
        in: query
        name: before-time
        schema:
          format: date-time
          type: string
          x-algorand-format: RFC3339 String
        x-algorand-format: RFC3339 String
      - description: Include results after the given time. Must be an RFC 3339 formatted string.
        in: query
        name: after-time
        schema:
          format: date-time
          type: string
          x-algorand-format: RFC3339 String
        x-algorand-format: RFC3339 String
      - description: Accounts marked as proposer in the block header's participation updates. This parameter accepts a comma separated list of addresses.
        explode: false
        in: query
        name: proposers
        schema:
          items:
            type: string
            x-algorand-format: Address
          type: array
        style: form
      - description: Accounts marked as expired in the block header's participation updates. This parameter accepts a comma separated list of addresses.
        explode: false
        in: query
        name: expired
        schema:
          items:
            type: string
            x-algorand-format: Address
          type: array
        style: form
      - description: Accounts marked as absent in the block header's participation updates. This parameter accepts a comma separated list of addresses.
        explode: false
        in: query
        name: absent
        schema:
          items:
            type: string
            x-algorand-format: Address
          type: array
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  blocks:
                    items:
                      $ref: '#/components/schemas/Block'
                    type: array
                  current-round:
                    description: Round at which the results were computed.
                    type: integer
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                required:
                - blocks
                - current-round
                type: object
          description: (empty)
        '404':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      tags:
      - search
  /v2/transactions:
    get:
      description: Search for transactions. Transactions are returned oldest to newest unless the address parameter is used, in which case results are returned newest to oldest.
      operationId: searchForTransactions
      parameters:
      - description: Maximum number of results to return. There could be additional pages even if the limit is not reached.
        in: query
        name: limit
        schema:
          type: integer
      - description: The next page of results. Use the next token provided by the previous results.
        in: query
        name: next
        schema:
          type: string
      - description: Specifies a prefix which must be contained in the note field.
        in: query
        name: note-prefix
        schema:
          type: string
          x-algorand-format: base64
        x-algorand-format: base64
      - in: query
        name: tx-type
        schema:
          enum:
          - pay
          - keyreg
          - acfg
          - axfer
          - afrz
          - appl
          - stpf
          - hb
          type: string
      - description: 'SigType filters just results using the specified type of signature:

          * sig - Standard

          * msig - MultiSig

          * lsig - LogicSig'
        in: query
        name: sig-type
        schema:
          enum:
          - sig
          - msig
          - lsig
          type: string
      - description: Lookup transactions by group ID. This field must be base64-encoded, and afterwards, base64 characters that are URL-unsafe (i.e. =, /, +) must be URL-encoded
        in: query
        name: group-id
        schema:
          type: string
          x-algorand-format: base64
        x-algorand-format: base64
      - description: Lookup the specific transaction by ID.
        in: query
        name: txid
        schema:
          type: string
      - description: Include results for the specified round.
        in: query
        name: round
        schema:
          type: integer
      - description: Include results at or after the specified min-round.
        in: query
        name: min-round
        schema:
          type: integer
      - description: Include results at or before the specified max-round.
        in: query
        name: max-round
        schema:
          type: integer
      - description: Asset ID
        in: query
        name: asset-id
        schema:
          type: integer
      - description: Include results before the given time. Must be an RFC 3339 formatted string.
        in: query
        name: before-time
        schema:
          format: date-time
          type: string
          x-algorand-format: RFC3339 String
        x-algorand-format: RFC3339 String
      - description: Include results after the given time. Must be an RFC 3339 formatted string.
        in: query
        name: after-time
        schema:
          format: date-time
          type: string
          x-algorand-format: RFC3339 String
        x-algorand-format: RFC3339 String
      - description: Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
        in: query
        name: currency-greater-than
        schema:
          type: integer
      - description: Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
        in: query
        name: currency-less-than
        schema:
          type: integer
      - description: Only include transactions with this address in one of the transaction fields.
        in: query
        name: address
        schema:
          type: string
          x-algorand-format: Address
        x-algorand-format: Address
      - description: Combine with the address parameter to define what type of address to search for.
        in: query
        name: address-role
        schema:
          enum:
          - sender
          - receiver
          - freeze-target
          type: string
      - description: Combine with address and address-role parameters to define what type of address to search for. The close to fields are normally treated as a receiver, if you would like to exclude them set this parameter to true.
        in: query
        name: exclude-close-to
        schema:
          type: boolean
      - description: Include results which include the rekey-to field.
        in: query
        name: rekey-to
        schema:
          type: boolean
      - description: Application ID
        in: query
        name: application-id
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  current-round:
                    description: Round at which the results were computed.
                    type: integer
                  next-token:
                    description: Used for pagination, when making another request provide this token with the next parameter.
                    type: string
                  transactions:
                    items:
                      $ref: '#/components/schemas/Transaction'
                    type: array
                required:
                - current-round
                - transactions
                type: object
          description: (empty)
        '400':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
        '500':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties: {}
                    type: object
                  message:
                    type: string
                required:
                - message
                type: object
          description: Response for errors
      tags:
      - search
components:
  schemas:
    StateProofParticipant:
      properties:
        verifier:
          $ref: '#/components/schemas/StateProofVerifier'
        weight:
          description: \[w\]
          type: integer
          x-algorand-format: uint64
      type: object
    Asset:
      description: Specifies both the unique identifier and the parameters for an asset
      properties:
        created-at-round:
          description: Round during which this asset was created.
          type: integer
          x-algorand-format: uint64
        deleted:
          description: Whether or not this asset is currently deleted.
          type: boolean
        destroyed-at-round:
          description: Round during which this asset was destroyed.
          type: integer
          x-algorand-format: uint64
        index:
          description: unique asset identifier
          type: integer
        params:
          $ref: '#/components/schemas/AssetParams'
      required:
      - index
      - params
      type: object
    BoxReference:
      description: BoxReference names a box by its name and the application ID it belongs to.
      properties:
        app:
          description: Application ID to which the box belongs, or zero if referring to the called application.
          type: integer
        name:
          description: Base64 encoded box name
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
      required:
      - app
      - name
      type: object
    HoldingRef:
      description: HoldingRef names a holding by referring to an Address and Asset it belongs to.
      properties:
        address:
          description: \[d\] Address in access list, or the sender of the transaction.
          type: string
          x-algorand-format: Address
        asset:
          description: \[s\] Asset ID for asset in access list.
          type: integer
      required:
      - address
      - asset
      type: object
    EvalDelta:
      description: Represents a TEAL value delta.
      properties:
        action:
          description: \[at\] delta action.
          type: integer
        bytes:
          description: \[bs\] bytes value.
          type: string
        uint:
          description: \[ui\] uint value.
          type: integer
          x-algorand-format: uint64
      required:
      - action
      type: object
    StateProofSignature:
      properties:
        falcon-signature:
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        merkle-array-index:
          type: integer
          x-algorand-foramt: uint64
        proof:
          $ref: '#/components/schemas/MerkleArrayProof'
        verifying-key:
          description: \[vkey\]
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
      type: object
    TransactionSignatureLogicsig:
      description: '\[lsig\] Programatic transaction signature.


        Definition:

        data/transactions/logicsig.go'
      properties:
        args:
          description: \[arg\] Logic arguments, base64 encoded.
          items:
            type: string
          type: array
        logic:
          description: \[l\] Program signed by a signature or multi signature, or hashed to be the address of ana ccount. Base64 encoded TEAL program.
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        logic-multisig-signature:
          $ref: '#/components/schemas/TransactionSignatureMultisig'
        multisig-signature:
          $ref: '#/components/schemas/TransactionSignatureMultisig'
        signature:
          description: \[sig\] ed25519 signature.
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
      required:
      - logic
      type: object
    TransactionStateProof:
      description: "Fields for a state proof transaction. \n\nDefinition:\ndata/transactions/stateproof.go : StateProofTxnFields"
      properties:
        message:
          $ref: '#/components/schemas/IndexerStateProofMessage'
        state-proof:
          $ref: '#/components/schemas/StateProofFields'
        state-proof-type:
          description: \[sptype\] Type of the state proof. Integer representing an entry defined in protocol/stateproof.go
          type: integer
          x-algorand-format: uint64
      type: object
    TransactionSignatureMultisigSubsignature:
      properties:
        public-key:
          description: \[pk\]
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        signature:
          description: \[s\]
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
      type: object
    LocalsRef:
      description: LocalsRef names a local state by referring to an Address and App it belongs to.
      properties:
        address:
          description: \[d\] Address in access list, or the sender of the transaction.
          type: string
          x-algorand-format: Address
        app:
          description: \[p\] Application ID for app in access list, or zero if referring to the called application.
          type: integer
      required:
      - address
      - app
      type: object
    ResourceRef:
      description: ResourceRef names a single resource. Only one of the fields should be set.
      properties:
        address:
          description: \[d\] Account whose balance record is accessible by the executing ApprovalProgram or ClearStateProgram.
          type: string
          x-algorand-format: Address
        application-id:
          description: "\\[p\\] Application id whose GlobalState may be read by the executing\n ApprovalProgram or ClearStateProgram."
          type: integer
        asset-id:
          description: "\\[s\\] Asset whose AssetParams may be read by the executing\n ApprovalProgram or ClearStateProgram."
          type: integer
        box:
          $ref: '#/components/schemas/BoxReference'
        holding:
          $ref: '#/components/schemas/HoldingRef'
        local:
          $ref: '#/components/schemas/LocalsRef'
      type: object
    Transaction:
      description: 'Contains all fields common to all transactions and serves as an envelope to all transactions type. Represents both regular and inner transactions.


        Definition:

        data/transactions/signedtxn.go : SignedTxn

        data/transactions/transaction.go : Transaction

        '
      properties:
        application-transaction:
          $ref: '#/components/schemas/TransactionApplication'
        asset-config-transaction:
          $ref: '#/components/schemas/TransactionAssetConfig'
        asset-freeze-transaction:
          $ref: '#/components/schemas/TransactionAssetFreeze'
        asset-transfer-transaction:
          $ref: '#/components/schemas/TransactionAssetTransfer'
        auth-addr:
          description: \[sgnr\] this is included with signed transactions when the signing address does not equal the sender. The backend can use this to ensure that auth addr is equal to the accounts auth addr.
          type: string
          x-algorand-format: Address
        close-rewards:
          description: \[rc\] rewards applied to close-remainder-to account.
          type: integer
        closing-amount:
          description: \[ca\] closing amount for transaction.
          type: integer
        confirmed-round:
          description: Round when the transaction was confirmed.
          type: integer
        created-application-index:
          description: Specifies an application index (ID) if an application was created with this transaction.
          type: integer
        created-asset-index:
          description: Specifies an asset index (ID) if an asset was created with this transaction.
          type: integer
        fee:
          description: \[fee\] Transaction fee.
          type: integer
        first-valid:
          description: \[fv\] First valid round for this transaction.
          type: integer
        genesis-hash:
          description: \[gh\] Hash of genesis block.
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        genesis-id:
          description: \[gen\] genesis block ID.
          type: string
        global-state-delta:
          $ref: '#/components/schemas/StateDelta'
        group:
          description: \[grp\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        heartbeat-transaction:
          $ref: '#/components/schemas/TransactionHeartbeat'
        id:
          description: Transaction ID
          type: string
        inner-txns:
          description: Inner transactions produced by application execution.
          items:
            $ref: '#/components/schemas/Transaction'
          type: array
        intra-round-offset:
          description: Offset into the round where this transaction was confirmed.
          type: integer
        keyreg-transaction:
          $ref: '#/components/schem

# --- truncated at 32 KB (77 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/algorand/refs/heads/main/openapi/algorand-search-api-openapi.yml