UNPKG

6.17 kBJSONView Raw
1{"openapi":"3.0.0","info":{"contact":{"name":"OpenCage Data Ltd","url":"https://opencagedata.com/contact"},"description":"Worldwide forward and reverse geocoding","termsOfService":"https://opencagedata.com/terms","title":"OpenCage Geocoder","version":"1","x-apisguru-categories":["location"],"x-logo":{"url":"https://avatars0.githubusercontent.com/u/11941736?v=3&s=200"},"x-origin":[{"format":"swagger","url":"https://opencagedata.com/swagger.yaml","version":"2.0"},{"format":"swagger","url":"https://geocoder.opencagedata.com/swagger.yaml","version":"2.0"}],"x-providerName":"opencagedata.com"},"externalDocs":{"description":"OpenCage Geocoder Website","url":"https://opencagedata.com/api"},"paths":{"/v{version}/{format}":{"get":{"description":"geocode a query","parameters":[{"description":"API version.","in":"path","name":"version","required":true,"schema":{"type":"integer"}},{"description":"format of the response. One of 'json', 'xml' or 'map'.","in":"path","name":"format","required":true,"schema":{"type":"string"}},{"description":"string or lat,lng to be geocoded.","in":"query","name":"q","required":true,"schema":{"type":"string"}},{"description":"an application key.","in":"query","name":"key","required":true,"schema":{"type":"string"}},{"description":"when true we attempt to abbreviate the formatted field in the response.","in":"query","name":"abbrv","schema":{"type":"boolean"}},{"description":"if true the request is included in the response.","in":"query","name":"add_request","schema":{"type":"boolean"}},{"description":"four coordinate points forming the south-west and north-east corners of a bounding box (min long, min lat, max long, max lat).","in":"query","name":"bounds","schema":{"type":"string"}},{"description":"two letter code ISO 3166-1 Alpha 2 code to limit results to that country.","in":"query","name":"countrycode","schema":{"type":"string"}},{"description":"wraps the returned JSON with a function name.","in":"query","name":"jsonp","schema":{"type":"string"}},{"description":"an IETF format language code (ex: 'es' or 'pt-BR').","in":"query","name":"language","schema":{"type":"string"}},{"description":"maximum number of results to return. Default is 10. Maximum is 100.","in":"query","name":"limit","schema":{"type":"integer"}},{"description":"integer from 1-10. Only results with at least this confidence are returned.","in":"query","name":"min_confidence","schema":{"type":"integer"}},{"description":"when true annotations are not added to results.","in":"query","name":"no_annotations","schema":{"type":"boolean"}},{"description":"when true results are not deduplicated.","in":"query","name":"no_dedupe","schema":{"type":"boolean"}},{"description":"when true query content is not logged.","in":"query","name":"no_record","schema":{"type":"boolean"}},{"description":"when true results are pretty printed. Useful for debugging.","in":"query","name":"pretty","schema":{"type":"boolean"}},{"description":"lat,lng to bias results.","in":"query","name":"proximity","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"402":{"description":"Valid request but quota exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"403":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"404":{"description":"Invalid API endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"410":{"description":"Request too long","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}},"503":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Response"}},"text/html":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"servers":[{"url":"https://api.opencagedata.com/geocode"}],"components":{"schemas":{"LatLng":{"properties":{"lat":{"format":"float","type":"number"},"lng":{"format":"float","type":"number"}},"type":"object"},"Response":{"properties":{"documentation":{"type":"string"},"licenses":{"items":{"properties":{"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"type":"array"},"rate":{"properties":{"limit":{"type":"integer"},"remaining":{"type":"integer"},"reset":{"type":"integer"}},"type":"object"},"results":{"items":{"properties":{"annotations":{"type":"object"},"bounds":{"properties":{"northeast":{"$ref":"#/components/schemas/LatLng"},"southwest":{"$ref":"#/components/schemas/LatLng"}},"type":"object"},"components":{"type":"object"},"confidence":{"type":"integer"},"formatted":{"type":"string"},"geometry":{"$ref":"#/components/schemas/LatLng"}},"type":"object"},"type":"array"},"status":{"properties":{"code":{"type":"integer"},"message":{"type":"string"}},"type":"object"},"stay_informed":{"properties":{"blog":{"type":"string"},"twitter":{"type":"string"}},"type":"object"},"thanks":{"type":"string"},"timestamp":{"properties":{"created_http":{"type":"string"},"created_unix":{"type":"integer"}},"type":"object"},"total_results":{"type":"integer"}}}}}}
\No newline at end of file