{
  "openapi": "3.0.1",
  "info": {
    "title": "Genius Lyrics & Songs Scraper",
    "description": "Scrape song lyrics, artist info, and trending songs from Genius.com. Search songs/artists/albums, fetch lyrics by URL or ID, get artist top songs. No API key required.",
    "version": "1.0",
    "x-build-id": "7RI2pcsGACuJexD2w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~genius-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-genius-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/crawlerbros~genius-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-genius-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/crawlerbros~genius-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-genius-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode",
          "proxy"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "trending",
              "search",
              "artistSongs",
              "byUrl",
              "byId"
            ],
            "type": "string",
            "description": "What to scrape from Genius.",
            "default": "trending"
          },
          "chartGenre": {
            "title": "Chart genre",
            "enum": [
              "all",
              "pop",
              "rap",
              "electronic",
              "rock",
              "country",
              "rb"
            ],
            "type": "string",
            "description": "Genre filter for the trending charts (mode=trending).",
            "default": "all"
          },
          "timePeriod": {
            "title": "Chart time period",
            "enum": [
              "day",
              "week",
              "month",
              "all_time"
            ],
            "type": "string",
            "description": "Time window for the trending charts (mode=trending).",
            "default": "day"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Search term (mode=search)."
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "song",
              "artist",
              "album",
              "video",
              "article",
              "user",
              "lyric"
            ],
            "type": "string",
            "description": "Type of entity to search for (mode=search).",
            "default": "song"
          },
          "artistName": {
            "title": "Artist name",
            "type": "string",
            "description": "Artist name to fetch top songs for (mode=artistSongs)."
          },
          "artistSongsSort": {
            "title": "Artist songs sort order",
            "enum": [
              "popularity",
              "title",
              "release_date"
            ],
            "type": "string",
            "description": "Sort order for the artist's songs (mode=artistSongs).",
            "default": "popularity"
          },
          "songUrls": {
            "title": "Song URLs",
            "type": "array",
            "description": "Genius song page URLs to fetch (mode=byUrl). e.g. https://genius.com/Queen-bohemian-rhapsody-lyrics",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "songIds": {
            "title": "Song IDs",
            "type": "array",
            "description": "Genius numeric song IDs (mode=byId).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeLyrics": {
            "title": "Include lyrics",
            "type": "boolean",
            "description": "Fetch full song lyrics text (requires an additional HTTP request per song).",
            "default": true
          },
          "includeArtistDetails": {
            "title": "Include artist profile details",
            "type": "boolean",
            "description": "Fetch full artist profile (bio, follower count, social links) from the artist's own page. Applies to mode=search with searchType=artist (enriches each artist result) and mode=artistSongs (adds one bonus artist profile record alongside the songs). Requires an additional HTTP request per artist.",
            "default": true
          },
          "includeAlbumDetails": {
            "title": "Include album details & tracklist",
            "type": "boolean",
            "description": "Fetch full album details (description, track listing, pyongs/comment counts) from the album's own Genius page. Applies to mode=search with searchType=album. Requires an additional HTTP request per album.",
            "default": true
          },
          "includeAnnotations": {
            "title": "Include lyric annotations",
            "type": "boolean",
            "description": "Fetch crowd-sourced annotations that explain specific lyric fragments (the same explanations shown in the highlighted-lyric popups on a Genius song page), attached as an `annotations` array on each song record. Applies to song records only (any mode). Requires an additional HTTP request per song, so it's off by default.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of records to return.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy. Genius.com blocks Apify's default/datacenter IPs with HTTP 403 — Residential proxy is required for reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}