# OpenSea Collection Items API Documentation

<p><strong>OpenSea Collection Items API Documentation</strong> List items in one collection by slug. Each item has token id, contract address, chain, full-size image URL, traits, rarity rank, owner, last sale with token, best listing and best offer. Prices are numbers with a token. Filter by sort_by and direction. Pass after from the previous response for the next page. Every failed request costs no credit. Cost: 1 credit per successful request. Scrappa is an independent service and is not affiliated with or endorsed by OpenSea.</p>

- **Documentation:** [https://scrappa.co/docs/opensea-api/opensea_items](https://scrappa.co/docs/opensea-api/opensea_items)
- **API group:** OpenSea API
- **Endpoint:** `GET https://scrappa.co/api/opensea/collections/items`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | Yes | Collection slug, e.g. courtyard-nft. Required. |
| `limit` | integer | No | Rows per page, 1 to 100. |
| `after` | string | No | Cursor from the previous response. |
| `sort_by` | string | No | PRICE, CREATED_DATE, RARITY or LAST_SALE. |
| `direction` | string | No | ASC or DESC. |

## Example response

```json
{
    "data": {
        "slug": "courtyard-nft",
        "items": [
            {
                "chain": "polygon",
                "image": "https://i2c.seadn.io/example.jpg",
                "token_id": "4231837087468264",
                "last_sale": {
                    "usd": 4.99,
                    "token": {
                        "unit": "USDC",
                        "symbol": "USDC"
                    }
                },
                "rarity_rank": 42,
                "contract_address": "0x251be3a17af4892035c37ebf5890f4a4d889dcad"
            }
        ],
        "pagination": {
            "limit": 20,
            "has_more": true
        }
    },
    "meta": {
        "source": "opensea",
        "credits": 1,
        "billable": true,
        "endpoint_family": "gql_web"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The slug or a filter is invalid. This response is not billable. |
| 502 | Bad Gateway | The public data is temporarily unavailable. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
