Home | Demo | Usage |
The API is publically available by making GET call to the following URL:
https://api.ahmado.com/EventExt/ProcessPost.php
the query text should be sent as a parameter named textQuery. Examples below show how to use the API in various environments.
https://api.ahmado.com/EventExt/ProcessPost.php?textQuery=Try+This+Expression+For+Event+Extraction
import requests url = 'https://api.ahmado.com/EventExt/ProcessPost.php' params = {"textQuery": "Try This Expression For Event Extraction"} resp = requests.get(url=url, params=params) data = resp.json() print data
$ curl -H "Accept: application/json" -v "https://api.ahmado.com/EventExt/ProcessPost.php?textQuery=Try+This+Expression+For+Event+Extraction" * Trying 69.163.226.197... * Connected to api.ahmado.com (69.163.226.197) port 443 (#0) * found 148 certificates in /etc/ssl/certs/ca-certificates.crt * found 594 certificates in /etc/ssl/certs * ALPN, offering http/1.1 * SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256 * server certificate verification OK * server certificate status verification SKIPPED * common name: api.ahmado.com (matched) * server certificate expiration date OK * server certificate activation date OK * certificate public key: RSA * certificate version: #3 * subject: CN=api.ahmado.com * start date: Wed, 12 Dec 2018 01:27:42 GMT * expire date: Tue, 12 Mar 2019 01:27:42 GMT * issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3 * compression: NULL * ALPN, server did not agree to a protocol > GET /ProcessPost.php?textQuery=Try+This+Expression+For+Event+Extraction HTTP/1.1 > Host: api.ahmado.com > User-Agent: curl/7.47.0 > Accept: text/html,application/json > < HTTP/1.1 200 OK < Date: Tue, 25 Dec 2018 19:03:52 GMT < Server: Apache < Transfer-Encoding: chunked < Content-Type: application/json < {"confidence":-0.448748916387558,"dates":[],"query":"Try This Expression For Event Extraction"} * Connection #0 to host api.ahmado.com left intact
$.ajax({ contentType : "application/json; charset=utf-8", type: "GET", dataType: "json", url: "https://api.ahmado.com/EventExt/ProcessPost.php", data: {textQuery: "Try This Expression For Event Extraction"}, success: function(result) { console.log("Completed"); console.log(result); }, error: function(error) { console.log("Failed"); console.log(error); } });
Back to NLP-as-a-Service APIs |