@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Search Services
@base https://api.archive.org/
@version 1.0.0
@endpoints 3
@toc search(3)

@endpoint GET /search/v1/scrape
@desc Scrape search results from Internet Archive, allowing a scrolling cursor
@optional {q: any # Lucene-type search query, field: any # Metadata field, sort: any # sort collations, size: any # Number of query results to return, cursor: any # Cursor for scrolling (used for subsequent calls), total_only: any # Request total only; do not return hits, callback: any # Specifies a JavaScript function func, for a JSON-P response. When provided, results are wrapped as `callback(data)`, and the returned MIME type is application/javascript. This causes the caller to automatically run the func with the JSON results as its argument.}
@returns(200) Scaping API

@endpoint GET /search/v1/organic
@desc Return relevance-based results from search queries
@optional {q: any # Lucene-type search query, field: any # Metadata field, size: any # Number of query results to return, total_only: any # Request total only; do not return hits, callback: any # Specifies a JavaScript function func, for a JSON-P response. When provided, results are wrapped as `callback(data)`, and the returned MIME type is application/javascript. This causes the caller to automatically run the func with the JSON results as its argument.}
@returns(200) Organic Search API. Returns results in descending relevance order

@endpoint GET /search/v1/fields
@desc Fields that can be requested
@optional {callback: any # Specifies a JavaScript function func, for a JSON-P response. When provided, results are wrapped as `callback(data)`, and the returned MIME type is application/javascript. This causes the caller to automatically run the func with the JSON results as its argument.}
@returns(200) Fields that can be requested

@end
