openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 5.06 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"x-twitter":"internetarchive"},"description":"API for Internet Archive's Search-related services\n","title":"Search Services","version":"1.0.0","x-apisguru-categories":["search"],"x-logo":{"url":"https://twitter.com/internetarchive/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/ArchiveLabs/api.archive.org/master/swagger/search.yaml","version":"2.0"}],"x-providerName":"archive.org","x-serviceName":"search"},"paths":{"/search/v1/fields":{"get":{"description":"Fields that can be requested","parameters":[{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"Fields that can be requested","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Field"},"type":"array"}},"application/javascript":{"schema":{"items":{"$ref":"#/components/schemas/Field"},"type":"array"}}}}}}},"/search/v1/organic":{"get":{"description":"Return relevance-based results from search queries\n","parameters":[{"$ref":"#/components/parameters/query"},{"$ref":"#/components/parameters/field"},{"$ref":"#/components/parameters/size"},{"$ref":"#/components/parameters/total_only"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"Organic Search API. Returns results in descending relevance order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganicResult"}},"application/javascript":{"schema":{"$ref":"#/components/schemas/OrganicResult"}}}},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/javascript":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/v1/scrape":{"get":{"description":"Scrape search results from Internet Archive, allowing a scrolling cursor\n","parameters":[{"$ref":"#/components/parameters/query"},{"$ref":"#/components/parameters/field"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/size"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/total_only"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"Scaping API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeResult"}},"application/javascript":{"schema":{"$ref":"#/components/schemas/ScrapeResult"}}}},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/javascript":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"servers":[{"url":"https://api.archive.org/"}],"components":{"parameters":{"callback":{"description":"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.","in":"query","name":"callback","required":false,"schema":{"type":"string"}},"cursor":{"description":"Cursor for scrolling (used for subsequent calls)","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},"field":{"description":"Metadata field","in":"query","name":"field","required":false,"schema":{"type":"string","minLength":1,"maxLength":250,"default":"identifier"}},"query":{"description":"Lucene-type search query","in":"query","name":"q","schema":{"type":"string"}},"size":{"description":"Number of query results to return","in":"query","name":"size","required":false,"schema":{"type":"integer","minimum":10,"maximum":10000,"default":1000}},"sort":{"description":"sort collations","in":"query","name":"sort","required":false,"schema":{"type":"string","minLength":5,"maxLength":250}},"total_only":{"description":"Request total only; do not return hits","in":"query","name":"total_only","required":false,"schema":{"type":"boolean","default":false}}},"schemas":{"Cursor":{"description":"A scroll handle","type":"string"},"Error":{"properties":{"code":{"format":"int32","type":"integer"},"message":{"type":"string"}}},"Field":{"description":"The name of a field","type":"string"},"Hit":{"description":"One item returned (object of fields and values)","type":"object"},"OrganicResult":{"description":"The result of a organic search request","properties":{"count":{"description":"Number of results returned","maximum":10000,"minimum":0,"type":"integer"},"items":{"items":{"$ref":"#/components/schemas/Hit"},"type":"array"},"total":{"description":"Approximate number of results meeting query","minimum":0,"type":"integer"}},"type":"object"},"ScrapeResult":{"description":"The result of a scrape request","properties":{"count":{"description":"Number of results returned","maximum":10000,"minimum":0,"type":"integer"},"cursor":{"$ref":"#/components/schemas/Cursor"},"items":{"items":{"$ref":"#/components/schemas/Hit"},"type":"array"},"previous":{"$ref":"#/components/schemas/Cursor"},"total":{"description":"Total number of results from this cursor point","minimum":0,"type":"integer"}},"type":"object"}}}}