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 2026Releases
latest 34-
4.0.019 Aug 2026Release notes
Open source →Breaking changes
- Added
SearchOrder.trendingfor pub.dev's trend-score ordering. Consumers
with an exhaustive switch overSearchOrdermust add atrendingcase.
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
VersionRangeWeeklyDownloadsfor total and version-range download histories.Repository.fromMapandRepository.fromJson.- Re-exported the
pubspec_parsedependency types exposed through
PubPackage.latestPubspec.
Fixed
- Search queries and tags now percent-encode reserved characters such as
#
and&instead of silently truncating the request. fetchGooglePackagesno longer sends a malformedtools.dart.devpublisher
tag and now includeslabs.dart.dev.
Deprecated
SearchOrder.popularity; useSearchOrder.downloads.PackageScore.popularityScore; use
PackageScore.downloadCount30Days.LatestVersion; comparePubPackage.versiondirectly. 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
Release notes
Open source →Breaking changes
- Added
SearchOrder.trendingfor pub.dev's trend-score ordering. Consumers with an exhaustive switch overSearchOrdermust add atrendingcase
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 queryPackageScoreCard.weeklyVersionDownloads,WeeklyVersionDownloads, andVersionRangeWeeklyDownloads— total weekly downloads plus major, minor, and patch version-range histories #78Repository.fromMapandRepository.fromJson, matching the other models- Re-export the
pubspec_parsedependency types (Dependency,HostedDependency,GitDependency,PathDependency,SdkDependency,HostedDetails,Pubspec) so consumers can name the types reachable fromPubPackage.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 likec# & c++returned results forc fetchGooglePackagesno longer sends a malformedtools.dart.devpublisher tag, and now includes thelabs.dart.devpublisher
Deprecated
SearchOrder.popularity— pub.dev retired the popularity score and serves these requests asSearchOrder.top. UseSearchOrder.downloadsPackageScore.popularityScore— pub.dev no longer returns this field. UsePackageScore.downloadCount30DaysLatestVersion— 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, andfetchFlutterFavorites, and separately for each publisher queried byfetchGooglePackages - Generated
*.mapper.dartfiles are excluded from analysis, and three lint rules removed from the Dart SDK were dropped fromanalysis_options.yaml
Release notes
Open source →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
- Added
-
3.2.007 Nov 2025Release notes
Open source →-
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
-
-
3.1.121 Feb 2025Release notes
Open source → -
3.1.007 Jan 2025Release notes
Open source →What's Changed
- 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
Full Changelog: 3.0.0...v3.1.0
Release notes
Open source →-
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
-
3.0.001 Oct 2024Release notes
Open source →- Replaced deprecated
pubspectopubspec_parsepackage - 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
Release notes
Open source →- Replaced deprecated
pubspectopubspec_parsepackage - Extensions for Pubspec, repository, issueTracker, screenshots, and issueTracker are now properties and not methods, for consistency with
pubspec_parse
Release notes
Open source →-
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
- Replaced deprecated
-
2.7.126 Sep 2024Release notes
Open source →What's Changed
- Fix result data class by @tilucasoli in #50
New Contributors
- @tilucasoli made their first contribution in #50
Full Changelog: 2.7.0...2.7.1
-
2.7.009 Mar 2024Release notes
Open source →What's Changed
- Updated schema by @leoafarias in #48
- Add missing field to pubspec by @jxstxn1 in #47
New Contributors
Full Changelog: 2.6.0...3.0.0
Release notes
Open source →- Updated schema by @leoafarias
- Added missing field to pubspec by @jxstxn1
Release notes
Open source →-
Updated schema by @leoafarias
-
Added missing field to pubspec by @jxstxn1
-
2.6.008 Aug 2023Release notes
Open source →What's Changed
- Fixes issue when closing client by @leoafarias in #40
- Added topics to search method by @leoafarias in #41
Full Changelog: 2.5.0...2.6.0
Release notes
Open source →- Feature: Added topics parameters to search method
- Chore: Improved models' equality and toString methods
- Fix: Hanging on close #40
Release notes
Open source →-
Feature: Added topics parameters to search method
-
Chore: Improved models' equality and toString methods
-
Fix: Hanging on close #40
-
2.5.008 Aug 2023Release notes
Open source →What's Changed
- Update dependencies; Dart SDK version to
3.0.0. by @gmpassos in #36 - Ability to customize user agent by @leoafarias in #37
- Fix/handle invalid json error by @leoafarias in #38
- Chore/update doc endpoint by @leoafarias in #39
New Contributors
Full Changelog: 2.4.0...2.5.0
Release notes
Open source →- Feature: Ability to customize user-agent
- Chore: Set the minimum Dart SDK version to
3.0.0by @gmpassos - Chore: Updated dependencies by @gmpassos
- Chore: Switched analysis to use
lintsby @gmpassos - Chore: Pub.dev API no longer returns latestStableVersion for documentation endpoint
- Fix: Handle invalid JSON on exception
Release notes
Open source →-
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
- Update dependencies; Dart SDK version to
-
2.4.017 Feb 2023 -
2.3.019 Dec 2022 -
2.2.113 Jan 2022Release notes
Open source →Thank you @Rexios80 for all the great contributions
- Chore: Updated dependencies
- Fix: Recursive paging shares client
- Added: More tests
Release notes
Open source →Thank you @Rexios80 for all the great contributions
-
Chore: Updated dependencies
-
Fix: Recursive paging shares client
-
Added: More tests
-
2.2.006 Jan 2022Release notes
Open source →- Fixed
Clientinterface for custom HTTP Client by @Rexios80 #17 - Added Flutter Favorites, Google Packages, and Publisher Package request helpers.
Release notes
Open source →-
Fixed Client interface for custom HTTP Client by @Rexios80 #17
-
Added Flutter Favorites, Google Packages, and Publisher Package request helpers.
- Fixed
-
2.1.115 Sep 2021 -
2.1.006 Aug 2021 -
2.0.706 Aug 2021 -
2.0.605 Aug 2021Release notes
Open source →Changed
- PackageScore nullable fields. Package metrics do not return fields when the package is being processed. #10
Release notes
Open source →Changed
- PackageScore nullable fields. Package metrics do not return fields when the package is being processed. #10
-
2.0.510 May 2021 -
2.0.428 Apr 2021 -
2.0.328 Apr 2021 -
2.0.228 Apr 2021 -
2.0.112 Apr 2021Release notes
Open source →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
Release notes
Open source →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
-
2.0.030 Mar 2021 -
2.0.0-beta.125 Mar 2021 pre-releaseNothing published for this version
-
1.0.929 Oct 2020Release notes
Open source →Changed
- Ability to pass custom HTTP Client as a parameter
- Changed latest version to display stable version only
Release notes
Open source →Changed
-
Ability to pass custom HTTP Client as a parameter
-
Changed latest version to display stable version only
-
1.0.822 Oct 2020Release notes
Open source →Changed
- Added search filter for
publisheror fordependency - Added Google packages helpers
Release notes
Open source →Changed
-
Added search filter for publisher or for dependency
-
Added Google packages helpers
- Added search filter for
-
1.0.721 Oct 2020Release notes
Open source →Changed
- Added package publisher
- Added package options
- Added package version info
- Added documentation
- Exposed models
Release notes
Open source →Changed
-
Added package publisher
-
Added package options
-
Added package version info
-
Added documentation
-
Exposed models
-
1.0.621 Oct 2020Nothing published for this version
-
1.0.520 Oct 2020 -
1.0.420 Oct 2020Release notes
Open source →Changed
- Added check for package update
- Added console printer for package update
Release notes
Open source →Changed
-
Added check for package update
-
Added console printer for package update
-
1.0.320 Oct 2020 -
1.0.219 Oct 2020 -
1.0.119 Oct 2020 -
1.0.019 Oct 2020Release notes
Open source →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