{"id":21247145,"url":"https://github.com/alchemyplatform/nft-api-example","last_synced_at":"2025-07-10T22:32:07.717Z","repository":{"id":44754696,"uuid":"451309580","full_name":"alchemyplatform/nft-api-example","owner":"alchemyplatform","description":"Repository with some example calls to the Alchemy NFT API","archived":false,"fork":false,"pushed_at":"2022-02-01T05:47:07.000Z","size":61,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-21T04:11:08.345Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemyplatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-24T03:59:40.000Z","updated_at":"2023-06-04T04:24:30.000Z","dependencies_parsed_at":"2022-09-23T11:50:58.456Z","dependency_job_id":null,"html_url":"https://github.com/alchemyplatform/nft-api-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Fnft-api-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Fnft-api-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Fnft-api-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemyplatform%2Fnft-api-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemyplatform","download_url":"https://codeload.github.com/alchemyplatform/nft-api-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225658502,"owners_count":17503667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T02:16:40.992Z","updated_at":"2024-11-21T02:16:41.612Z","avatar_url":"https://github.com/alchemyplatform.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"### Overview\n\nThis repo demonstrates three ways to use the Alchemy NFT API.\n\n### (Recents View) Fetch all the NFTs that belong to an address.\n\nFetches a paginated list of NFT's owned by the given address. You can use this function to display all of the user's NFTs in a list view. For example you might have the user connect their wallet via metamask and then direct them to a page where they can see all their NFTs. All you have to do is put the user's wallet address into this function and you will get back an array of NFTs that you can render. Each NFT will have an image uri that you can render along with the title of the NFT.\n\nExample display\n\n\u003ccenter\u003e\u003cimg src=\"https://user-images.githubusercontent.com/5247707/150714145-30642204-e7ea-47cb-a2e1-ec3616250bc9.png\" alt=\"drawing\" width=\"200\"/\u003e\u003c/center\u003e\n\nUsage\n\n```javascript\nconst ownerAddress = \"0x04f5df957ce0405ba0264eca6130161cfaa12571\";\n\nconst response = await getNFTsForOwner(ownerAddress);\nconsole.log(firstPage.ownedNfts);\n```\n\n### (Individual Collection View) Fetch all the NFTs that belong to an address filtered by a particular contract/collection.\n\nFetches paginated list of NFT's owned by the given address only for the given collection. This function is practically the same as getNFTsForOwner but allows you to only fetch NFTs for the user that belong to a particular collection. For instance if you have rendered the NFTs from getNFTsForOwner and allowed the user to tap into the collection, then you may want to only render NFTs for that particular collection for the user.\n\nExample display\n\n\u003ccenter\u003e\u003cimg src=\"https://user-images.githubusercontent.com/5247707/150714183-c887090e-b242-44cc-9f49-3e487790fd74.png\" alt=\"drawing\" width=\"200\"/\u003e\u003c/center\u003e\n\nUsage\n\n```javascript\nconst ownerAddress = \"0x04f5df957ce0405ba0264eca6130161cfaa12571\";\nconst contractAddress = \"0x60e4d786628fea6478f785a6d7e704777c86a7c6\";\n\nconst response = await getNFTsForOwner(ownerAddress, contractAddress);\nconsole.log(response.ownedNfts);\n```\n\n### (Collections View) Fetch all collections for which an address owns an NFT.\n\nFetches NFT's owned by the given address and grouped by collection. This endpoint allows you to display the user's NFTs organized by collection rather than as a flat list of images. The response will be a list of collections and inside those collections will be a list of NFTs that the user owns for that collection. Each collection also has a `name` and `verified` field for optional display.\n\nExample display\n\n\u003ccenter\u003e\u003cimg src=\"https://user-images.githubusercontent.com/5247707/150714225-44b5b81a-529d-4d10-b775-e84ff6176336.png\" alt=\"drawing\" width=\"200\"/\u003e\u003c/center\u003e\n\nUsage\n\n```javascript\nconst ownerAddress = \"0x04f5df957ce0405ba0264eca6130161cfaa12571\";\n\nconst response = await getCollectionsForOwner(ownerAddress);\nconsole.log(response.collections);\n```\n\n### Documentation\n\nYou can find additional Alchemy documentation for these methods here https://docs.alchemy.com/alchemy/enhanced-apis/nft-api/getnfts.\n\n### Install dependencies\n\n```bash\nyarn\n```\n\n### See all three methods in action\n\n```bash\nyarn dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Fnft-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemyplatform%2Fnft-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemyplatform%2Fnft-api-example/lists"}