# Contract Metadata By Address [Batch]

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/nft/v3/{apiKey}/getContractMetadataBatch

getContractMetadataBatch - Retrieves metadata for a list of specified contract addresses in a single request.

Reference: https://www.alchemy.com/docs/reference/nft-api-endpoints/nft-api-endpoints/nft-metadata-endpoints/get-contract-metadata-batch-v-3

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes |  |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch \
  --header 'Content-Type: application/json' \
  --data '{
  "contractAddresses": [
    "0xe785E82358879F061BC3dcAC6f0444462D4b5330",
    "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    contractAddresses: [
      '0xe785E82358879F061BC3dcAC6f0444462D4b5330',
      '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'
    ]
  })
};

fetch('https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch"

payload = { "contractAddresses": ["0xe785E82358879F061BC3dcAC6f0444462D4b5330", "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch"

	payload := strings.NewReader("{\n  \"contractAddresses\": [\n    \"0xe785E82358879F061BC3dcAC6f0444462D4b5330\",\n    \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch")
  .header("Content-Type", "application/json")
  .body("{\n  \"contractAddresses\": [\n    \"0xe785E82358879F061BC3dcAC6f0444462D4b5330\",\n    \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\"\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://eth-mainnet.g.alchemy.com/nft/v3/docs-demo/getContractMetadataBatch");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"contractAddresses\": [\n    \"0xe785E82358879F061BC3dcAC6f0444462D4b5330\",\n    \"0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d\"\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /v3/{apiKey}/getContractMetadataBatch
method: POST
operation:
  summary: Contract Metadata By Address [Batch]
  description: getContractMetadataBatch - Retrieves metadata for a list of specified contract addresses in a single request.
  tags:
    - NFT Metadata Endpoints
  parameters:
    - name: apiKey
      in: path
      schema:
        type: string
        default: docs-demo
        description: For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup)
      required: true
  requestBody:
    content:
      application/json:
        schema:
          type: object
          properties:
            contractAddresses:
              type: array
              description: List of contract addresses to batch metadata requests for.
              default:
                - '0xe785E82358879F061BC3dcAC6f0444462D4b5330'
                - '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'
              items:
                type: string
                default: '0xe785E82358879F061BC3dcAC6f0444462D4b5330'
  responses:
    '200':
      description: Returns an array of contract metadata corresponding to the batch query.
      content:
        application/json:
          schema:
            type: array
            description: Array of contract metadata objects corresponding to the query.
            items:
              type: object
              properties:
                address:
                  type: string
                  description: String - Contract address for the queried NFT collection
                name:
                  type: string
                  description: String - NFT contract name.
                symbol:
                  type: string
                  description: String - NFT contract symbol abbreviation.
                totalSupply:
                  type: string
                  description: String - Total number of NFTs in a given NFT collection.
                tokenType:
                  type: string
                  enum:
                    - ERC721
                    - ERC1155
                    - NO_SUPPORTED_NFT_STANDARD
                    - NOT_A_CONTRACT
                  description: String - For valid NFTs, 'ERC721' or 'ERC1155.' For invalid NFTs, a descriptive reason such as 'NO_SUPPORTED_NFT_STANDARD' if the input contract address doesn't support a known NFT standard, or 'NOT_A_CONTRACT' if there is no contract deployed at the input address.
                contractDeployer:
                  type: string
                  description: String - Address that deployed the smart contract
                deployedBlockNumber:
                  type: number
                  description: Number - The Block Number when the deployment transaction is successfully mined
                openseaMetadata:
                  type: object
                  description: Note that the OpenSea metadata object is currently only available on ETH and Polygon Mainnet. Please reach out to us at support@alchemy.com if you would like to access this data on other networks.
                  properties:
                    floorPrice:
                      type: number
                      description: NFT floor price
                    collectionName:
                      type: string
                      description: OpenSea collection name
                    safelistRequestStatus:
                      type: string
                      description: Collection approval status within OpenSea. For more info, see the Opensea docs at docs.opensea.io/reference/collection-model
                    imageUrl:
                      type: string
                      description: OpenSea CDN image URL
                    description:
                      type: string
                      description: 'OpenSea collection description. Note: this value is truncated to 255 characters.'
                    externalUrl:
                      type: string
                      description: Collection homepage
                    twitterUsername:
                      type: string
                      description: The twitter username of the collection
                    discordUrl:
                      type: string
                      description: The discord URL of the collection
                    bannerImageUrl:
                      type: string
                      description: The banner image URL of the collection
                    lastIngestedAt:
                      type: string
                      description: The timestamp when the collection was last ingested by us
  operationId: getContractMetadataBatch-v3
```
