# Genius Chart API Documentation

<p>Get a Genius chart: songs, albums, artists or referents (trending annotations). Every item carries page views. The response has no total. Request the next page until a page has no items. Artist and referent charts only support chart_genre all. Referent items have no lyric line.</p>

- **Documentation:** [https://scrappa.co/docs/genius-api/genius_chart](https://scrappa.co/docs/genius-api/genius_chart)
- **API group:** Genius API
- **Endpoint:** `GET https://scrappa.co/api/genius/chart`

## 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 |
| --- | --- | --- | --- |
| `type` | string | No | songs, albums, artists or referents. Default: songs. |
| `chart_genre` | string | No | all, pop, rap, rock, country or electronic. Default: all. |
| `time_period` | string | No | all_time, day, week or month. Default: day. |
| `page` | integer | No | Page number, starting at 1. Default: 1. |
| `per_page` | integer | No | Results per page, 1-50. Default: 20. |

## Example response

```json
{
    "data": {
        "chart_items": [
            {
                "item": {
                    "id": 3039923,
                    "url": "https://genius.com/Kendrick-lamar-humble-lyrics",
                    "stats": {
                        "pageviews": 12358095
                    },
                    "title": "HUMBLE.",
                    "full_title": "HUMBLE. by Kendrick Lamar",
                    "lyrics_url": "https://genius.com/Kendrick-lamar-humble-lyrics",
                    "artist_names": "Kendrick Lamar",
                    "lyrics_state": "complete",
                    "annotation_count": 21,
                    "song_art_image_url": "https://images.genius.com/483306c535608c27f9e3781b854dc91d.1000x1000x1.png",
                    "release_date_for_display": "March 30, 2017"
                },
                "type": "song"
            }
        ]
    },
    "meta": {
        "billable": true,
        "proxy_tier": "mobile-proxies",
        "technology": "http",
        "endpoint_family": "chart"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Genius has no resource for this id or path. This response is not billable. |
| 422 | Validation Error | A parameter is missing or invalid. No upstream request is made. This response is not billable. |
| 503 | Genius Temporarily Unavailable | Genius did not answer in time or the request was blocked. Retry after a short pause. 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)
