top

Introduction

Go Search API, or GSAPI, returns structured data with json or jsonp format.

The path of GSAPI is “/api”.

Please put a link to http://go-search.org/ on you website if this API helps you.

Shared parameters

Field Value
action Possible values: package, tops, packages
callback (optional) If provided, return jsonp code with this as the callback function.
The callback function has two parameters. First parameter is an integer of code, and the second is the value object returned.
example

“package” Action

Returns the information of a package. example

“tops” Action

Returns the tops tables. example

“packages” Action

Returns the ID array of all packages. link

An array of strings, each of which is the ID (or import path) of a package.

“package_depends” Action

Returns an array of dependency information of all packages. link

An array of the following struct:

Field Type Value
Package string Import path, ID of a package in GS
Name string Package name
TestImported []string List of packages that imports this package only in test cases.
Imported []string List of packages that imports this package
TestImports []string List of packages this package (only) test imports
Imports []string List of packages that imports this package

“search” Action

Returns the search result. example