# Genius Search API Documentation

<p>Search Genius by type: song, lyric, artist, album or all. Each hit carries id, title, artists, release date, annotation count, page views, artwork and the Genius URL. Lyric search returns the matching songs with a lyric_match flag, never the lyric text. Type all returns up to 5 hits per section, including videos, articles and users.</p>

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

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Search text. Example: humble. |
| `type` | string | No | song, lyric, artist, album or all. Default: song. |
| `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": {
        "sections": [
            {
                "hits": [
                    {
                        "type": "song",
                        "result": {
                            "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"
            }
        ],
        "next_page": 2
    },
    "meta": {
        "billable": true,
        "proxy_tier": "mobile-proxies",
        "technology": "http",
        "endpoint_family": "search"
    },
    "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)
