cover image decorating the page API for developers #

Stay informed #

This document describes the officially supported API of the site. may expose API endpoints that are available publicly, but unless they are documented here, we don't consider them as officially supported, and may change or remove them without notice.

Changes to the officially supported API will be announced at Dart announce.

Hosted Pub Repository API # implements the Hosted Pub Repository Specification V2, used by the pub command line client application.

Additional APIs #

Package names for name completion #



  • accept-encoding: gzip


  • cache-control: public, max-age=28800
  • content-encoding: gzip
  • content-type: application/json; charset="utf-8"
  "packages": [
    /* further package names */

The API returns the top package names on To reduce payload size the result may not include all package names. The size limitation is subject to change.

The response is always a gzip-ed JSON content, and should be cached on the client side for at least 8 hours between requests (as indicated by the cache-control header).


  • Not all package names are included in this response.
  • The inclusion criteria used by may change without notice.


I'd like to implement search, what API can I use? #

Please use the above package names for name completion data to fetch the list of package names, and implement search in your app based on that list.

I'd like to request a new API. What should I do? #

Please check if there is already a similar request or open a new issue. The following requirements are must have for an API endpoint to be considered as official:

  • The data must be public.
  • The API must be without side effects (e.g. read-only).
  • The response must be cacheable (e.g. we should be able to offload it to a CDN).