|
rev. 334 services/apiref services/apisrv services/caches services/caches/formatters services/caches/search services/caches/shortcuts services/logs services/oauth services/replicate services/users |
Search for geocaches
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
| http://www.opencaching.us/okapi/services/caches/search/all | ||||
|
Search for geocaches using some simple filters. All of them are optional, but you surely want to use at least some of them. If you're looking for a way to keep your geocaching database in sync with ours, have a peek at the replicate module. |
||||
| type | optional |
Pipe-separated list of cache type codes. If given, the results will be limited to the given cache types. For a list of cache type codes, see services/caches/geocache method. Notice: If you want to include all cache types except given ones, prepend your list with the "-" sign. |
||
| status | optional |
Default value: Available Pipe-separated list of status codes. Only caches matching any of the given statuses will included in the response. For a list of cache status codes, see services/caches/geocache method. |
||
| owner_uuid | optional |
Pipe-separated list of user IDs. If given, the list of returned caches will be limited to those owned by the given users. Notice: User ID and Username are two different things! |
||
| name | optional |
UTF-8 encoded string - the name (or part of the name) of the cache. Allowed wildcard characters:
Name matching is case-insensitive. Maximum length for the name parameter is 100 characters. Examples:
Notice: Cache code and name are two different things - if you want to find a cache by its code, use the services/caches/geocache method. |
||
| terrain | optional |
Default value: 1-5 A string "X-Y", where X and Y are integers between 1 and 5, and X <= Y. Only caches with terrain rating between these numbers (inclusive) will be returned. |
||
| difficulty | optional |
Default value: 1-5 A string "X-Y", where X and Y are integers between 1 and 5, and X <= Y. Only caches with difficulty rating between these numbers (inclusive) will be returned. |
||
| size | optional |
A string "X-Y", where X and Y are integers between 1 and 5, and X <= Y. Only caches with size attribute between these numbers (inclusive) will be returned (1 - micro, 5 - very big). Notice: If you use this parameter, all caches which do not have a container (like Event or Virtual caches) will be excluded from the results. |
||
| rating | optional |
A string "X-Y", where X and Y are integers between 1 and 5, and X <= Y. Only caches with an overall rating between these numbers (inclusive) will be returned (1 - poor, 5 - excellent). Notice: If you use this parameter, all caches with less than 4 votes will be excluded from results. |
||
| min_rcmds | optional |
There are two possible value-types for this argument:
|
||
| min_founds | optional |
Integer N. If N given, the result will contain only those caches which have been found at least N times. Useful if you want to skip "unverified" caches. |
||
| max_founds | optional |
Integer N. If N given, the result will contain only those caches which have been found at most N times. Useful for FTF hunters. |
||
| modified_since | optional |
A date and time string, in any reasonable format (any acceptable by PHP's strtotime function, ISO 8601 preffered). If given, the list of returned geocaches will be limited to those which were created or modified since that date. (Note: currently caches do not get "modified" when user makes a log entry.) |
||
| found_status | optional |
Default value: either Notice: This parameter may be used only for requests signed with an Access Token (you will need to use Level 3 Authentication). Should be one of the following:
|
||
| found_by | optional |
User UUID. If given, the response will only include geocaches found by the given user. |
||
| not_found_by | optional |
User UUID. If given, the response will only include geocaches not found by the given user. |
||
| exclude_my_own | optional |
Default value: false Notice: This parameter may be used only for requests signed with an Access Token (you will need to use Level 3 Authentication). Boolean. If set to true, caches which the user is an owner of will not be included in the result. |
||
| limit | optional |
Default value: 100 Integer in range 1..500. Maximum number of caches codes returned. |
||
| offset | optional |
Default value: 0 An offset, the amount of items to skip at the beginning of the result. Combined with limit allows pagination of the result set. Please note, that the sum of offset and limit still cannot exceed 500. You MAY NOT use this method to list all the caches, it is for searching only. Have a peek at the replicate module if you need all the caches. |
||
| order_by | optional |
Default value: 0 Pipe separated list of fields to order the results by. Prefix the field name with a '-' sign to indicate a descending order. Currently, fields which you can order by include: code, name, founds, rcmds, rcmds%. Examples:
Note:It is highly recommended to avoid executing separate OKAPI request every time you want to sort the data which you already have. Consider caching and sorting on client side. |
||
| format | optional | Standard common formatting argument. | ||
| callback | optional | Standard common formatting argument. | ||
| Plus required consumer_key argument, assigned for your application. | ||||
|
Returned value: A dictionary of the following structure:
| ||||