-
Notifications
You must be signed in to change notification settings - Fork 194
API docs
The API itself is in its very early stages. Everything will change, but here are some sample URLs to play with. Keep in mind that these URLs all return JSON. Here are few things to keep in mind.
- All URLs return JSON
- For pretty JSON, pass the pretty parameter. eg pretty=true
- To limit your results, pass the size parameter. eg size=100000
- To limit the fields returned, pass a comma-separated list in the fields param. eg fields=_source.distvname,_source.name
http://api.metacpan.org/module/Moose::Meta::Attribute::Native::MethodProvider::Counter
http://api.metacpan.org/module/_search?q=dist:moose
Note that for this type of search, the author id must be in lower case.
http://api.metacpan.org/module/_search?q=author:oalders
Alternate syntax:
curl -XGET 'api.metacpan.org/module/_search?pretty=true' -d '{
"query" : {
"term" : { "author" : "oalders" }
}
}
'
http://api.metacpan.org/module/_search?q=*&size=100000
Same list, but return only "name" and "distvname" fields: http://api.metacpan.org/module/_search?&fields=_source.distvname,_source.name&q=*&size=100000
http://api.metacpan.org/author/DROLSKY
http://api.metacpan.org/author/_search?q=author:D*
http://api.metacpan.org/author/_search?q=name:Dave
http://api.metacpan.org/author/_search?q=name:%22dave%20rolsky%22
http://api.metacpan.org/author/_search?pretty=true&q=*&size=100000
Search for CPANRatings (http://cpanratings.perl.org/)
http://api.metacpan.org/cpanratings/Moose