ELECTRO GPT

ELECTRO GPT · GPT Actions

Spotify Artist Information API

This API provides information about artists on Spotify.

  • GET /artists/{id}Get information about an artist on Spotify
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Spotify Artist Information API",
    "description": "This API provides information about artists on Spotify.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.spotify.com/v1"
    }
  ],
  "paths": {
    "/artists/{id}": {
      "get": {
        "summary": "Get information about an artist on Spotify",
        "operationId": "getArtist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Spotify ID of the artist",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with artist information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artist"
                }
              }
            }
          },
          "400": {
            "description": "Bad request, e.g., invalid artist ID"
          },
          "401": {
            "description": "Unauthorized, e.g., missing or invalid access token"
          },
          "404": {
            "description": "Artist not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Artist": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the artist"
          },
          "popularity": {
            "type": "integer",
            "description": "Popularity of the artist on Spotify"
          },
          "genres": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of genres the artist is associated with"
          },
          "followers": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Number of Spotify users following the artist"
              }
            }
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "description": "URL of the image"
                },
                "width": {
                  "type": "integer",
                  "description": "Width of the image"
                },
                "height": {
                  "type": "integer",
                  "description": "Height of the image"
                }
              }
            }
          }
        }
      }
    }
  }
}

Last.fm API Integration

An OpenAPI specification for integrating with the Last.fm API to fetch artist information.

  • GET /Get artist information

    Fetches detailed information for a given artist from the Last.fm API.

原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Last.fm API Integration",
    "description": "An OpenAPI specification for integrating with the Last.fm API to fetch artist information.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://ws.audioscrobbler.com/2.0/"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getArtistInfo",
        "summary": "Get artist information",
        "description": "Fetches detailed information for a given artist from the Last.fm API.",
        "parameters": [
          {
            "name": "method",
            "in": "query",
            "required": true,
            "description": "API method to be called",
            "schema": {
              "type": "string",
              "enum": [
                "artist.getinfo"
              ]
            }
          },
          {
            "name": "artist",
            "in": "query",
            "required": true,
            "description": "The artist to fetch information for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api_key",
            "in": "query",
            "required": true,
            "description": "f9cc79bd514788a511f4d88355a57635",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "Response format, defaults to JSON",
            "schema": {
              "type": "string",
              "default": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "artist": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "bio": {
                          "type": "object",
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}

Discogs Artist Releases API

API for retrieving release information for artists from Discogs.

  • GET /artists/{artist_id}/releasesRetrieve releases for a specified artist
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Discogs Artist Releases API",
    "description": "API for retrieving release information for artists from Discogs.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.discogs.com"
    }
  ],
  "paths": {
    "/artists/{artist_id}/releases": {
      "get": {
        "summary": "Retrieve releases for a specified artist",
        "operationId": "getArtistReleases",
        "parameters": [
          {
            "name": "artist_id",
            "in": "path",
            "required": true,
            "description": "The ID of the artist",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "The field to sort by",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "description": "The order of sorting, either 'asc' for ascending or 'desc' for descending",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with artist's releases",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtistReleases"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "404": {
            "description": "Artist not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ArtistReleases": {
        "type": "object",
        "properties": {
          "pagination": {
            "type": "object",
            "properties": {
              "per_page": {
                "type": "integer"
              },
              "items": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "pages": {
                "type": "integer"
              },
              "urls": {
                "type": "object",
                "properties": {
                  "last": {
                    "type": "string"
                  },
                  "next": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "releases": {
            "type": "array",
            "description": "Array of releases for the artist",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "year": {
                  "type": "integer"
                },
                "resource_url": {
                  "type": "string"
                },
                "id": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}

SerpApi Specific Search Results Retrieval

API for retrieving specific search results from SerpApi.

  • GET /searches/{search_id}/{result_id}.jsonRetrieve specific search results
原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "SerpApi Specific Search Results Retrieval",
    "description": "API for retrieving specific search results from SerpApi.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://serpapi.com"
    }
  ],
  "paths": {
    "/searches/{search_id}/{result_id}.json": {
      "get": {
        "summary": "Retrieve specific search results",
        "operationId": "getSpecificSearchResults",
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the search",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "result_id",
            "in": "path",
            "required": true,
            "description": "Unique identifier for the search result",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful retrieval of search result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResult"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchResult": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "snippet": {
            "type": "string"
          }
        }
      }
    }
  }
}