@@ -756,3 +756,120 @@ export type GetSwapQuoteResponse = {
756756 * @category API Response Types
757757 */
758758export type GetTokenResponse = Token ;
759+
760+ /**
761+ * Query args for the Search endpoint.
762+ * @category API Query Args
763+ */
764+ export interface SearchArgs {
765+ /** Search query text */
766+ query : string ;
767+ /** Filter by blockchain(s) */
768+ chains ?: string [ ] ;
769+ /** Filter by asset type(s): collection, nft, token, account */
770+ asset_types ?: string [ ] ;
771+ /** Number of results to return (default: 20, max: 50) */
772+ limit ?: number ;
773+ }
774+
775+ /**
776+ * Collection search result.
777+ * @category API Models
778+ */
779+ export type CollectionSearchResult = {
780+ /** The collection slug */
781+ collection : string ;
782+ /** The collection name */
783+ name : string ;
784+ /** URL of the collection image */
785+ image_url : string | null ;
786+ /** Whether trading is disabled for this collection */
787+ is_disabled : boolean ;
788+ /** Whether this collection is marked as NSFW */
789+ is_nsfw : boolean ;
790+ /** URL to the collection on OpenSea */
791+ opensea_url : string ;
792+ } ;
793+
794+ /**
795+ * Token (currency) search result.
796+ * @category API Models
797+ */
798+ export type TokenSearchResult = {
799+ /** Contract address of the token */
800+ address : string ;
801+ /** Blockchain the token is on */
802+ chain : string ;
803+ /** Token name */
804+ name : string ;
805+ /** Token symbol */
806+ symbol : string ;
807+ /** URL of the token image */
808+ image_url : string | null ;
809+ /** Current USD price of the token */
810+ usd_price : string ;
811+ /** Number of decimal places for the token */
812+ decimals : number ;
813+ /** URL to the token on OpenSea */
814+ opensea_url : string ;
815+ } ;
816+
817+ /**
818+ * NFT search result.
819+ * @category API Models
820+ */
821+ export type NftSearchResult = {
822+ /** Token ID of the NFT */
823+ identifier : string ;
824+ /** Collection slug the NFT belongs to */
825+ collection : string ;
826+ /** Contract address of the NFT */
827+ contract : string ;
828+ /** Name of the NFT */
829+ name : string | null ;
830+ /** URL of the NFT image */
831+ image_url : string | null ;
832+ /** URL to the NFT on OpenSea */
833+ opensea_url : string ;
834+ } ;
835+
836+ /**
837+ * Account search result.
838+ * @category API Models
839+ */
840+ export type AccountSearchResult = {
841+ /** Primary wallet address of the account */
842+ address : string ;
843+ /** Username of the account */
844+ username : string | null ;
845+ /** URL of the account's profile image */
846+ profile_image_url : string | null ;
847+ /** URL to the account on OpenSea */
848+ opensea_url : string ;
849+ } ;
850+
851+ /**
852+ * A single search result with a type discriminator and the corresponding typed object.
853+ * @category API Models
854+ */
855+ export type SearchResult = {
856+ /** The type of search result */
857+ type : string ;
858+ /** Collection details, present when type is 'collection' */
859+ collection ?: CollectionSearchResult ;
860+ /** Token details, present when type is 'token' */
861+ token ?: TokenSearchResult ;
862+ /** NFT details, present when type is 'nft' */
863+ nft ?: NftSearchResult ;
864+ /** Account details, present when type is 'account' */
865+ account ?: AccountSearchResult ;
866+ } ;
867+
868+ /**
869+ * Response from OpenSea API for search.
870+ * @category API Response Types
871+ */
872+ export type SearchResponse = {
873+ /** List of search results ranked by relevance */
874+ results : SearchResult [ ] ;
875+ } ;
0 commit comments