{
  "openapi": "3.1.0",
  "info": {
    "title": "FastSaverAPI",
    "version": "1.0.0",
    "summary": "One REST API to download media from Instagram, TikTok, YouTube, Shazam and more.",
    "description": "Media downloader REST API. Authenticate with an `X-Api-Key` header; every response is JSON with an `ok` flag. Get a key with 1,000 free credits at https://api.fastsaver.io/auth.\n\nNote: this API moved from fastsaverapi.com to api.fastsaver.io on 2026-07-24.",
    "contact": {
      "name": "FastSaverAPI support",
      "url": "https://t.me/coder2077"
    },
    "termsOfService": "https://api.fastsaver.io/"
  },
  "servers": [
    {
      "url": "https://api.fastsaver.io/v1",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Docs and live playground",
    "url": "https://api.fastsaver.io/docs"
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key"
      }
    }
  },
  "paths": {
    "/fetch": {
      "get": {
        "operationId": "fetch",
        "summary": "Download media from a social link",
        "description": "One universal endpoint for Instagram, TikTok, Pinterest, X (Twitter), Facebook and RuTube. Pass a link, get media back. Costs 1.5–5 credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public URL of the post, reel, video or album.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/youtube/info": {
      "get": {
        "operationId": "youtubeInfo",
        "summary": "Get YouTube video info and formats",
        "description": "Title, author, duration, thumbnails and every available format with its file size. Costs 2 credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "YouTube video URL.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/youtube/search": {
      "get": {
        "operationId": "youtubeSearch",
        "summary": "Search YouTube Music",
        "description": "Search YouTube Music and get 10 tracks per page, ready to download by video_id. Costs 2 credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Search text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "description": "Page number, 1–3.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/youtube/download": {
      "post": {
        "operationId": "youtubeDownload",
        "summary": "Download a YouTube video or its audio",
        "description": "Download a YouTube video from 144p to 2160p, or extract the audio track. Costs 15 (25 for 2K/4K) credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "format"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "YouTube video URL."
                  },
                  "format": {
                    "type": "string",
                    "description": "audio, 144p, 240p, 360p, 480p, 720p, 1080p, 1440p or 2160p."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/youtube/audio/tg-bot": {
      "post": {
        "operationId": "youtubeAudioTgBot",
        "summary": "Get YouTube audio as a Telegram file_id",
        "description": "Returns a Telegram file_id for the track — your bot forwards it without downloading anything. A cached track costs 7; a track we have to fetch first costs 15. Costs 7 cached, 15 on a miss credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "video_id",
                  "bot_username"
                ],
                "properties": {
                  "video_id": {
                    "type": "string",
                    "description": "YouTube or YouTube Music video ID."
                  },
                  "bot_username": {
                    "type": "string",
                    "description": "Your bot, e.g. @your_bot. The file_id is only valid for it."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/shazam/top": {
      "get": {
        "operationId": "shazamTop",
        "summary": "Get Shazam charts",
        "description": "Shazam charts by country, or worldwide. Costs 1 credit per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "description": "Country code (us, gb, ru, uz…) or \"world\" for the global chart.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "description": "Page number, 1–3. Ten tracks per page.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/shazam/identify": {
      "post": {
        "operationId": "shazamIdentify",
        "summary": "Identify a song from an audio file",
        "description": "Identify a song from an audio file (mp3, m4a, ogg, mp4 — up to 50 MB). Costs 5 credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Audio file, max 50 MB."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/shazam/lyrics": {
      "get": {
        "operationId": "shazamLyrics",
        "summary": "Get lyrics for a track",
        "description": "Lyrics for a track, looked up by title and artist. Costs 2 credits per request.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": [
          {
            "name": "title",
            "in": "query",
            "required": true,
            "description": "Track title, as /shazam/identify returned it.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "artist",
            "in": "query",
            "required": true,
            "description": "Credited artist.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/balance": {
      "get": {
        "operationId": "balance",
        "summary": "Check plan, credits and rate limit",
        "description": "Plan, remaining credits, rate limit and renewal date. Never spends credits. This endpoint is free and never spends credits.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. `ok` is true and the payload depends on the endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Request failed. `ok` is false and `detail` says why — including \"Insufficient credits. Please top up to your account.\" when the account is out of credits, and \"Invalid URL\" for an unsupported or malformed link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": false
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "detail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "429": {
            "description": "Rate limit for your plan exceeded. Retry after backing off."
          }
        },
        "parameters": []
      }
    }
  }
}