PackageTrack
Sign in Get early access

pub_api_client

An API Client for Pub to interact with public package information.

4.0.0 173K downloads/mo #906 most downloaded on pub.dev leoafarias/pub_api_client

What this package is like to depend on

Last release 5 days ago

19 Aug 2026

Ships fairly regularly

a new release about every 6 months

Nearly every release is documented

notes for 32 of 33 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

34 releases · first in 2020

2 releases in the last 12 months

see the full history below

Release timeline

34 releases · Oct 2020 to Aug 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 34
  1. 4.0.0 19 Aug 2026
    Release notes

    Breaking changes

    • Added SearchOrder.trending for pub.dev's trend-score ordering. Consumers
      with an exhaustive switch over SearchOrder must add a trending case.

    Added

    • packageLikes — public like count of a package, no authentication required.
    • publisherInfo — public publisher profile.
    • packageVersionScore — score of a single package version.
    • packageVersionOptions — retraction status of a single package version.
    • topicNameCompletion — every topic mapped to its package count.
    • SearchResults.message, set when pub.dev could not fully honor the query.
    • PackageScoreCard.weeklyVersionDownloads, WeeklyVersionDownloads, and
      VersionRangeWeeklyDownloads for total and version-range download histories.
    • Repository.fromMap and Repository.fromJson.
    • Re-exported the pubspec_parse dependency types exposed through
      PubPackage.latestPubspec.

    Fixed

    • Search queries and tags now percent-encode reserved characters such as #
      and & instead of silently truncating the request.
    • fetchGooglePackages no longer sends a malformed tools.dart.dev publisher
      tag and now includes labs.dart.dev.

    Deprecated

    • SearchOrder.popularity; use SearchOrder.downloads.
    • PackageScore.popularityScore; use
      PackageScore.downloadCount30Days.
    • LatestVersion; compare PubPackage.version directly. Removal is scheduled
      for 5.0.0.

    Other changes

    • Documented pub.dev's 10-page search limit and its effect on recursive search
      helpers.
    • Modernized analysis, CI, and automated publishing. Releases now authenticate
      to pub.dev with GitHub OIDC instead of a long-lived workflow credential.

    Full changelog: 3.2.0...4.0.0

    Open source →
    Release notes

    Breaking changes

    • Added SearchOrder.trending for pub.dev's trend-score ordering. Consumers with an exhaustive switch over SearchOrder must add a trending case

    Added

    • packageLikes — public like count of a package, no authentication required (GET /api/packages/<package>/likes)
    • publisherInfo — public publisher profile (GET /api/publishers/<publisherId>)
    • packageVersionScore — score of a single package version (GET /api/packages/<package>/versions/<version>/score)
    • packageVersionOptions — retraction status of a single package version (GET /api/packages/<package>/versions/<version>/options)
    • topicNameCompletion — every topic mapped to its package count (GET /api/topic-name-completion-data)
    • SearchResults.message, set when pub.dev could not fully honour the query
    • PackageScoreCard.weeklyVersionDownloads, WeeklyVersionDownloads, and VersionRangeWeeklyDownloads — total weekly downloads plus major, minor, and patch version-range histories #78
    • Repository.fromMap and Repository.fromJson, matching the other models
    • Re-export the pubspec_parse dependency types (Dependency, HostedDependency, GitDependency, PathDependency, SdkDependency, HostedDetails, Pubspec) so consumers can name the types reachable from PubPackage.latestPubspec #78

    Fixed

    • Search queries are now percent-encoded. Previously a # or & in the query or in a tag silently truncated the request, so searches like c# & c++ returned results for c
    • fetchGooglePackages no longer sends a malformed tools.dart.dev publisher tag, and now includes the labs.dart.dev publisher

    Deprecated

    • SearchOrder.popularity — pub.dev retired the popularity score and serves these requests as SearchOrder.top. Use SearchOrder.downloads
    • PackageScore.popularityScore — pub.dev no longer returns this field. Use PackageScore.downloadCount30Days
    • LatestVersion — unreachable model; no endpoint returns it and no client method produces it. Scheduled for removal in 5.0.0

    Changed

    • Documented that search paging is capped at 10 pages (100 results) by pub.dev. The cap applies once to fetchAllPackages, fetchPublisherPackages, and fetchFlutterFavorites, and separately for each publisher queried by fetchGooglePackages
    • Generated *.mapper.dart files are excluded from analysis, and three lint rules removed from the Dart SDK were dropped from analysis_options.yaml
    Open source →
    Release notes

    Breaking changes

    • Added SearchOrder.trending for pub.dev's trend-score ordering. Consumers with an exhaustive switch over SearchOrder must add a trending case

    Added

    • packageLikes — public like count of a package, no authentication required ( GET /api/packages/<package>/likes )

    • publisherInfo — public publisher profile ( GET /api/publishers/<publisherId> )

    • packageVersionScore — score of a single package version ( GET /api/packages/<package>/versions/<version>/score )

    • packageVersionOptions — retraction status of a single package version ( GET /api/packages/<package>/versions/<version>/options )

    • topicNameCompletion — every topic mapped to its package count ( GET /api/topic-name-completion-data )

    • SearchResults.message , set when pub.dev could not fully honour the query

    • PackageScoreCard.weeklyVersionDownloads , WeeklyVersionDownloads , and VersionRangeWeeklyDownloads — total weekly downloads plus major, minor, and patch version-range histories #78

    • Repository.fromMap and Repository.fromJson , matching the other models

    • Re-export the pubspec_parse dependency types ( Dependency , HostedDependency , GitDependency , PathDependency , SdkDependency , HostedDetails , Pubspec ) so consumers can name the types reachable from PubPackage.latestPubspec #78

    Fixed

    • Search queries are now percent-encoded. Previously a # or & in the query or in a tag silently truncated the request, so searches like c# & c++ returned results for c

    • fetchGooglePackages no longer sends a malformed tools.dart.dev publisher tag, and now includes the labs.dart.dev publisher

    Deprecated

    • SearchOrder.popularity — pub.dev retired the popularity score and serves these requests as SearchOrder.top . Use SearchOrder.downloads

    • PackageScore.popularityScore — pub.dev no longer returns this field. Use PackageScore.downloadCount30Days

    • LatestVersion — unreachable model; no endpoint returns it and no client method produces it. Scheduled for removal in 5.0.0

    Changed

    • Documented that search paging is capped at 10 pages (100 results) by pub.dev. The cap applies once to fetchAllPackages , fetchPublisherPackages , and fetchFlutterFavorites , and separately for each publisher queried by fetchGooglePackages

    • Generated *.mapper.dart files are excluded from analysis, and three lint rules removed from the Dart SDK were dropped from analysis_options.yaml

    Open source →
  2. 3.2.0 07 Nov 2025
    Release notes
    • Expose discontinued/advisory metadata on PubPackage and drop the large cached fixture from version control #75
    • Include the GitHub repository URL in the default User-Agent header #69
    • Improve WWW-Authenticate header parsing for authorization errors #70
    • Make lastUpdated optional by @Rexios80 in #61
    Open source →
    Release notes
    • Expose discontinued/advisory metadata on PubPackage and drop the large cached fixture from version control #75

    • Include the GitHub repository URL in the default User-Agent header #69

    • Improve WWW-Authenticate header parsing for authorization errors #70

    • Make lastUpdated optional by @Rexios80 in #61

    Open source →
  3. 3.1.1 21 Feb 2025
    Release notes

    What's Changed

    Full Changelog: 3.1.0...3.1.1

    Open source →
    Release notes
    • Download count is nullable by @Rexios80 in #59
    Open source →
    Release notes
    • Download count is nullable by @Rexios80 in #59
    Open source →
  4. 3.1.0 07 Jan 2025
    Release notes

    What's Changed

    Full Changelog: 3.0.0...v3.1.0

    Open source →
    Release notes
    • Adds topic tag by @Rexios80 in #53
    • Make granted/max points nullable again by @Rexios80 in #56
    • Add support for download counts by @Rexios80 in #58
    • Better recursive paging by @Rexios80 in #54
    • Add package names endpoint by @Rexios80 in #55
    Open source →
    Release notes
    • Adds topic tag by @Rexios80 in #53

    • Make granted/max points nullable again by @Rexios80 in #56

    • Add support for download counts by @Rexios80 in #58

    • Better recursive paging by @Rexios80 in #54

    • Add package names endpoint by @Rexios80 in #55

    Open source →
  5. 3.0.0 01 Oct 2024
    Release notes
    • Replaced deprecated pubspec to pubspec_parse package
    • Extensions for Pubspec, repository, issueTracker, screenshots, and issueTracker are now properties and not methods, for consistency with pubspec_parse

    Full Changelog: 2.7.1...3.0.0

    Open source →
    Release notes
    • Replaced deprecated pubspec to pubspec_parse package
    • Extensions for Pubspec, repository, issueTracker, screenshots, and issueTracker are now properties and not methods, for consistency with pubspec_parse
    Open source →
    Release notes
    • Replaced deprecated pubspec to pubspec_parse package

    • Extensions for Pubspec, repository, issueTracker, screenshots, and issueTracker are now properties and not methods, for consistency with pubspec_parse

    Open source →
  6. 2.7.1 26 Sep 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.7.0...2.7.1

    Open source →
    Release notes
    • Fix result data class schema #50
    Open source →
    Release notes
    • Fix result data class schema #50
    Open source →
  7. 2.7.0 09 Mar 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.6.0...3.0.0

    Open source →
    Release notes
    • Updated schema by @leoafarias
    • Added missing field to pubspec by @jxstxn1
    Open source →
    Release notes
    • Updated schema by @leoafarias

    • Added missing field to pubspec by @jxstxn1

    Open source →
  8. 2.6.0 08 Aug 2023
    Release notes

    What's Changed

    Full Changelog: 2.5.0...2.6.0

    Open source →
    Release notes
    • Feature: Added topics parameters to search method
    • Chore: Improved models' equality and toString methods
    • Fix: Hanging on close #40
    Open source →
    Release notes
    • Feature: Added topics parameters to search method

    • Chore: Improved models' equality and toString methods

    • Fix: Hanging on close #40

    Open source →
  9. 2.5.0 08 Aug 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 2.4.0...2.5.0

    Open source →
    Release notes
    • Feature: Ability to customize user-agent
    • Chore: Set the minimum Dart SDK version to 3.0.0 by @gmpassos
    • Chore: Updated dependencies by @gmpassos
    • Chore: Switched analysis to use lints by @gmpassos
    • Chore: Pub.dev API no longer returns latestStableVersion for documentation endpoint
    • Fix: Handle invalid JSON on exception
    Open source →
    Release notes
    • Feature: Ability to customize user-agent

    • Chore: Set the minimum Dart SDK version to 3.0.0 by @gmpassos

    • Chore: Updated dependencies by @gmpassos

    • Chore: Switched analysis to use lints by @gmpassos

    • Chore: Pub.dev API no longer returns latestStableVersion for documentation endpoint

    • Fix: Handle invalid JSON on exception

    Open source →
  10. 2.4.0 17 Feb 2023
    Release notes
    • Added the ability to search with any tags #32 thanks @Rexios80
    Open source →
    Release notes
    • Added the ability to search with any tags #32 thanks @Rexios80
    Open source →
  11. 2.3.0 19 Dec 2022
    Release notes
    • Updated dependencies
    • Removed freezed
    Open source →
    Release notes
    • Updated dependencies

    • Removed freezed

    Open source →
  12. 2.2.1 13 Jan 2022
    Release notes

    Thank you @Rexios80 for all the great contributions

    • Chore: Updated dependencies
    • Fix: Recursive paging shares client
    • Added: More tests
    Open source →
    Release notes

    Thank you @Rexios80 for all the great contributions

    • Chore: Updated dependencies

    • Fix: Recursive paging shares client

    • Added: More tests

    Open source →
  13. 2.2.0 06 Jan 2022
    Release notes
    • Fixed Client interface for custom HTTP Client by @Rexios80 #17
    • Added Flutter Favorites, Google Packages, and Publisher Package request helpers.
    Open source →
    Release notes
    • Fixed Client interface for custom HTTP Client by @Rexios80 #17

    • Added Flutter Favorites, Google Packages, and Publisher Package request helpers.

    Open source →
  14. 2.1.1 15 Sep 2021
    Release notes
    • Added close method to PubClient
    Open source →
    Release notes
    • Added close method to PubClient
    Open source →
  15. 2.1.0 06 Aug 2021
    Release notes

    Fixed

    • Exposed SearchOrder for sorting
    Open source →
    Release notes

    Fixed

    • Exposed SearchOrder for sorting
    Open source →
  16. 2.0.7 06 Aug 2021
    Release notes

    Added

    • Ability to sort search results
    Open source →
    Release notes

    Added

    • Ability to sort search results
    Open source →
  17. 2.0.6 05 Aug 2021
    Release notes

    Changed

    • PackageScore nullable fields. Package metrics do not return fields when the package is being processed. #10
    Open source →
    Release notes

    Changed

    • PackageScore nullable fields. Package metrics do not return fields when the package is being processed. #10
    Open source →
  18. 2.0.5 10 May 2021
    Release notes

    Changed

    • PublisherId is now a nullable string
    Open source →
    Release notes

    Changed

    • PublisherId is now a nullable string
    Open source →
  19. 2.0.4 28 Apr 2021
    Release notes

    Added

    • Better exception messaging
    Open source →
    Release notes

    Added

    • Better exception messaging
    Open source →
  20. 2.0.3 28 Apr 2021
    Release notes

    Added

    • Support for retrieving pub credentials on Windows
    Open source →
    Release notes

    Added

    • Support for retrieving pub credentials on Windows
    Open source →
  21. 2.0.2 28 Apr 2021
    Release notes

    Added

    • Ability to list liked packages
    • Like and unlike a package
    Open source →
    Release notes

    Added

    • Ability to list liked packages

    • Like and unlike a package

    Open source →
  22. 2.0.1 12 Apr 2021
    Release notes

    Added

    • Ability to get all package names for completion functionality

    Changed

    • Fetching Google packages calls hosted static file

    Removed

    • Check latest update API
    • Deprecated packages to keep a smaller dependency tree
    Open source →
    Release notes

    Added

    • Ability to get all package names for completion functionality

    Changed

    • Fetching Google packages calls hosted static file

    Removed

    • Check latest update API

    • Deprecated packages to keep a smaller dependency tree

    Open source →
  23. 2.0.0 30 Mar 2021
    Release notes

    Changed

    • Deprecated checkUpdatePrinter
    • Null safety
    Open source →
    Release notes

    Changed

    • Deprecated checkUpdatePrinter

    • Null safety

    Open source →
  24. 2.0.0-beta.1 25 Mar 2021 pre-release

    Nothing published for this version

  25. 1.0.9 29 Oct 2020
    Release notes

    Changed

    • Ability to pass custom HTTP Client as a parameter
    • Changed latest version to display stable version only
    Open source →
    Release notes

    Changed

    • Ability to pass custom HTTP Client as a parameter

    • Changed latest version to display stable version only

    Open source →
  26. 1.0.8 22 Oct 2020
    Release notes

    Changed

    • Added search filter for publisher or for dependency
    • Added Google packages helpers
    Open source →
    Release notes

    Changed

    • Added search filter for publisher or for dependency

    • Added Google packages helpers

    Open source →
  27. 1.0.7 21 Oct 2020
    Release notes

    Changed

    • Added package publisher
    • Added package options
    • Added package version info
    • Added documentation
    • Exposed models
    Open source →
    Release notes

    Changed

    • Added package publisher

    • Added package options

    • Added package version info

    • Added documentation

    • Exposed models

    Open source →
  28. 1.0.6 21 Oct 2020

    Nothing published for this version

  29. 1.0.5 20 Oct 2020
    Release notes

    Changed

    • Better pubspec parsing
    Open source →
    Release notes

    Changed

    • Better pubspec parsing
    Open source →
  30. 1.0.4 20 Oct 2020
    Release notes

    Changed

    • Added check for package update
    • Added console printer for package update
    Open source →
    Release notes

    Changed

    • Added check for package update

    • Added console printer for package update

    Open source →
  31. 1.0.3 20 Oct 2020
    Release notes

    Changed

    • Added user-agent to requests
    Open source →
    Release notes

    Changed

    • Added user-agent to requests
    Open source →
  32. 1.0.2 19 Oct 2020
    Release notes

    Changed

    • Further improvements
    Open source →
    Release notes

    Changed

    • Further improvements
    Open source →
  33. 1.0.1 19 Oct 2020
    Release notes

    Changed

    • Test improvements and API cleanup
    Open source →
    Release notes

    Changed

    • Test improvements and API cleanup
    Open source →
  34. 1.0.0 19 Oct 2020
    Release notes

    Changed

    • Initial version
    Open source →
    Release notes

    Changed

    • Initial version

    70

    likes

    160

    points

    168k

    downloads

    Documentation

    API reference

    Publisher

    leoafarias.com

    Weekly Downloads

    Metadata

    An API Client for Pub to interact with public package information.

    Repository (GitHub)

    View/report issues

    License

    MIT ( license )

    Dependencies

    dart_mappable , http , oauth2 , path , pubspec_parse

    More

    Packages that depend on pub_api_client

    ← Metadata

    70

    likes

    160

    points

    168k

    downloads

    Documentation

    API reference

    Publisher

    leoafarias.com

    Weekly Downloads

    Metadata

    An API Client for Pub to interact with public package information.

    Repository (GitHub)

    View/report issues

    License

    MIT ( license )

    Dependencies

    dart_mappable , http , oauth2 , path , pubspec_parse

    More

    Packages that depend on pub_api_client

    Back

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive