{"id":13414049,"url":"https://github.com/cyruzin/golang-tmdb","last_synced_at":"2026-03-11T19:09:14.051Z","repository":{"id":34970015,"uuid":"165322973","full_name":"cyruzin/golang-tmdb","owner":"cyruzin","description":"This is a Golang wrapper for working with TMDb API. It aims to support version 3.","archived":false,"fork":false,"pushed_at":"2025-12-10T22:56:37.000Z","size":567,"stargazers_count":151,"open_issues_count":1,"forks_count":43,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-11T10:39:39.270Z","etag":null,"topics":["api-wrapper","go","golang","themoviedatabase","themoviedb","tmdb","tmdb-api","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyruzin.png","metadata":{"files":{"readme":"README.md","changelog":"changes.go","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-11T22:59:33.000Z","updated_at":"2025-12-10T22:56:41.000Z","dependencies_parsed_at":"2023-01-15T11:13:23.050Z","dependency_job_id":"e20ae2ef-1f92-4b84-bed3-4d908de49411","html_url":"https://github.com/cyruzin/golang-tmdb","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/cyruzin/golang-tmdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fgolang-tmdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fgolang-tmdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fgolang-tmdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fgolang-tmdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyruzin","download_url":"https://codeload.github.com/cyruzin/golang-tmdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyruzin%2Fgolang-tmdb/sbom","scorecard":{"id":314759,"data":{"date":"2025-08-11","repo":{"name":"github.com/cyruzin/golang-tmdb","commit":"7f95ce6079f080cad836bedbbbe5065b38d8199f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":6,"reason":"Found 20/30 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/cyruzin/golang-tmdb/codeql-analysis.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/build.yml:30","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":8,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 18 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T23:57:17.903Z","repository_id":34970015,"created_at":"2025-08-17T23:57:17.903Z","updated_at":"2025-08-17T23:57:17.903Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30395149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","go","golang","themoviedatabase","themoviedb","tmdb","tmdb-api","wrapper"],"created_at":"2024-07-30T20:01:56.224Z","updated_at":"2026-03-11T19:09:13.999Z","avatar_url":"https://github.com/cyruzin.png","language":"Go","funding_links":[],"categories":["第三方API`第三方API 汇总`","Third-party APIs","第三方api","第三方API","Utility"],"sub_categories":["查询语","Utility/Miscellaneous","HTTP Clients","实用程序/Miscellaneous","Fail injection"],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"./img/logo.png\" width=\"350\"\u003e\u003c/p\u003e\n\n[![build](https://github.com/cyruzin/golang-tmdb/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/cyruzin/golang-tmdb/actions/workflows/build.yml) [![Coverage Status](https://coveralls.io/repos/github/cyruzin/golang-tmdb/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/cyruzin/golang-tmdb?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/cyruzin/golang-tmdb)](https://goreportcard.com/report/github.com/cyruzin/golang-tmdb) [![GoDoc](https://godoc.org/github.com/cyruzin/golang-tmdb?status.svg)](https://godoc.org/github.com/cyruzin/golang-tmdb) ![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/cyruzin/golang-tmdb) [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n\nThis is a Golang wrapper for working with TMDb API.\n\nAn API Key is required. To register for one, head over to [themoviedb.org](https://www.themoviedb.org/).\n\nThis product uses the TMDb API but is not endorsed or certified by TMDb.\n\n## Requirements\n\n- Go 1.13.x or higher. We aim to support the latest supported versions of go.\n\n## Installation\n\n```sh\ngo get -u github.com/cyruzin/golang-tmdb\n```\n\n## Usage\n\nTo get started, import the `tmdb` package and initiate the client:\n\n```go\nimport \"github.com/cyruzin/golang-tmdb\"\n\ntmdbClient, err := tmdb.Init(os.Getenv(\"YOUR_APIKEY\"))\nif err != nil {\n    fmt.Println(err)\n}\n\n// Using v4\ntmdbClient, err := tmdb.InitV4(os.Getenv(\"YOUR_BEARER_TOKEN\"))\nif err != nil {\n    fmt.Println(err)\n}\n\n// OPTIONAL (Recommended): Enabling auto retry functionality.\n// This option will retry if the previous request fail (429 TOO MANY REQUESTS).\ntmdbClient.SetClientAutoRetry()\n\n// OPTIONAL: Set an alternate base URL if you have problems with the default one.\n// Use https://api.tmdb.org/3 instead of https://api.themoviedb.org/3.\ntmdbClient.SetAlternateBaseURL()\n\n// OPTIONAL: For tests, set a custom base URL\ntmdbClient.SetCustomBaseURL(\"http://localhost:3000\")\n\n// Get the current base URL\ntmdbClient.GetBaseURL()\n\n// OPTIONAL: Setting a custom config for the http.Client.\n// The default timeout is 10 seconds. Here you can set other\n// options like Timeout and Transport.\ncustomClient := http.Client{\n    Timeout: time.Second * 5,\n    Transport: \u0026http.Transport{\n        MaxIdleConns: 10,\n        IdleConnTimeout: 15 * time.Second,\n    },\n}\n\ntmdbClient.SetClientConfig(customClient)\n\n// OPTIONAL: Enable this option if you're going to use endpoints\n// that needs session id.\n//\n// You can read more about how this works:\n// https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id\ntmdbClient.SetSessionID(os.Getenv(\"YOUR_SESSION_ID\"))\n\nmovie, err := tmdbClient.GetMovieDetails(297802, nil)\nif err != nil {\n fmt.Println(err)\n}\n\nfmt.Println(movie.Title)\n```\n\nWith optional params:\n\n```go\nimport \"github.com/cyruzin/golang-tmdb\"\n\ntmdbClient, err := tmdb.Init(os.Getenv(\"YOUR_APIKEY\"))\nif err != nil {\n    fmt.Println(err)\n}\n\n// Using v4\ntmdbClient, err := tmdb.InitV4(os.Getenv(\"YOUR_BEARER_TOKEN\"))\nif err != nil {\n    fmt.Println(err)\n}\n\noptions := map[string]string{\n  \"language\": \"pt-BR\",\n  \"append_to_response\": \"credits,images\",\n}\n\nmovie, err := tmdbClient.GetMovieDetails(297802, options)\nif err != nil {\n fmt.Println(err)\n}\n\nfmt.Println(movie.Title)\n```\n\nHelpers:\n\nGenerate image and video URLs:\n\n```go\nimport \"github.com/cyruzin/golang-tmdb\"\n\ntmdbClient, err := tmdb.Init(os.Getenv(\"YOUR_APIKEY\"))\nif err != nil {\n    fmt.Println(err)\n}\n\noptions := map[string]string{\n \"append_to_response\": \"videos\",\n}\n\nmovie, err := tmdbClient.GetMovieDetails(297802, options)\nif err != nil {\n fmt.Println(err)\n}\n\nfmt.Println(tmdb.GetImageURL(movie.BackdropPath, tmdb.W500))\n// Output: https://image.tmdb.org/t/p/w500/bOGkgRGdhrBYJSLpXaxhXVstddV.jpg\nfmt.Println(tmdb.GetImageURL(movie.PosterPath, tmdb.Original))\n// Ouput: https://image.tmdb.org/t/p/original/bOGkgRGdhrBYJSLpXaxhXVstddV.jpg\n\nfor _, video := range movie.MovieVideosAppend.Videos.MovieVideos.Results {\n   if video.Key != \"\" {\n\t fmt.Println(tmdb.GetVideoURL(video.Key))\n     // Output: https://www.youtube.com/watch?v=6ZfuNTqbHE8\n   }\n}\n```\n\nFor more examples, [click here](https://github.com/cyruzin/golang-tmdb/tree/master/examples).\n\n## Performance\n\nGetting Movie Details:\n\n| Iterations | ns/op    | B/op  | allocs/op |\n| ---------- | -------- | ----- | --------- |\n| 19         | 60886648 | 60632 | 184       |\n\nMulti Search:\n\n| Iterations | ns/op    | B/op   | allocs/op |\n| ---------- | -------- | ------ | --------- |\n| 16         | 66596963 | 107109 | 608       |\n\n## Contributing\n\nTo start contributing, please check [CONTRIBUTING](https://github.com/cyruzin/golang-tmdb/blob/master/CONTRIBUTING.md).\n\n### Tests\n\nFor local testing, just run:\n\n```go\n go test -v \n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyruzin%2Fgolang-tmdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyruzin%2Fgolang-tmdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyruzin%2Fgolang-tmdb/lists"}