{
  "openapi": "3.0.1",
  "info": {
    "title": "Automata Market Intelligence API",
    "description": "This is a generated connector for [Automata API v1.0.1](https://byautomata.io/api/) OpenAPI specification.\nThe Automata API provides the capability to identify the market intelligence.\n",
    "x-ballerina-init-description": "The connector initialization requires setting the API credentials. \nObtain tokens by following [this guide](https://apis.byautomata.io/?ref=api_landing_0).\n",
    "x-ballerina-display": {
      "label": "Automata",
      "iconPath": "icon.png"
    },
    "termsOfService": "https://byautomata.io/terms/",
    "contact": {
      "email": "support@byautomata.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.1",
    "x-logo": {
      "url": "https://s3.amazonaws.com/api.specs.byautomata.io/Logo_padding.png"
    }
  },
  "externalDocs": {
    "description": "Find out more about Automata and other Market Intelligence products.",
    "url": "http://byautomata.io"
  },
  "servers": [
    {
      "url": "https://api.byautomata.io/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "paths": {
    "/similar": {
      "get": {
        "operationId": "getSimilar",
        "tags": [
          "similar"
        ],
        "summary": "Send a company website to receive a list of companies related to them.",
        "parameters": [
          {
            "name": "link",
            "in": "query",
            "description": "We'll provide information about related companies based on the site you provide. If a LinkedIn page is sent, we will try to identify the company related to the page. Ex. https://api.byautomata.io/similar?link=ibm.com",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number of search results. Ex. https://api.byautomata.io/similar?link=ibm.com&page=1",
            "schema": {
              "type": "string",
              "default": "0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimilarCompanyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Your request was not valid. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "403": {
            "description": "Invalid API Key. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "501": {
            "description": "There was a server error. Please try again later or contact support@byautomata.io",
            "content": {}
          }
        },
        "deprecated": false,
        "x-code-samples": [
          {
            "lang": "Python",
            "source": "import requests\n\nurl = 'https://api.byautomata.io/similar?link=ibm.com'\npayload = {}\nheaders = {\n  'x-api-key': 'api_key'\n}\n\nresponse = requests.request('GET', url, headers=headers, data = payload)\nprint(response.text.encode('utf8'))"
          },
          {
            "lang": "PHP",
            "source": "$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.byautomata.io/similar?link=ibm.com\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST =>\"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"x-api-key: api-key\"\n  ),\n));\n\n$response = curl_exec($curl);\ncurl_close($curl);\necho $response;"
          },
          {
            "lang": "NodeJs",
            "source": "var request = require('request');\nvar options = {\n  'method': 'GET',\n  'url': 'https://api.byautomata.io/similar?link=ibm.com',\n  'headers': {\n    'x-api-key': 'api_key'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});"
          },
          {
            "lang": "cURL",
            "source": "curl --location --request GET 'https://api.byautomata.io/similar?link=ibm.com' \\\n--header 'x-api-key: api-key'"
          },
          {
            "lang": "Shell",
            "source": "wget --no-check-certificate --quiet \\\n  --method GET \\\n  --timeout=0 \\\n  --header 'x-api-key: 9OEDkaENEd2dzyF14fzcL73WQ5c8ifbX3waYbmhY' \\\n  'https://api.byautomata.io/similar?link=ibm.com'"
          }
        ]
      }
    },
    "/search": {
      "get": {
        "operationId": "search",
        "tags": [
          "search"
        ],
        "summary": "Send search terms to receive the most relevant companies along with text snippets.",
        "parameters": [
          {
            "name": "terms",
            "in": "query",
            "description": "We provide information about related companies based on the search terms you provide. Separate search terms with commas. Ex. https://api.byautomata.io/search?link=cloud+computing,enterprise,security",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number of search results. Ex. https://api.byautomata.io/search?page=0&link=cloud+computing,enterprise,security",
            "schema": {
              "type": "string",
              "default": "0"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Your request was not valid. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "403": {
            "description": "Invalid API Key. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "501": {
            "description": "There was a server error. Please try again later or contact support@byautomata.io",
            "content": {}
          }
        },
        "deprecated": false,
        "x-code-samples": [
          {
            "lang": "Python",
            "source": "import requests\n\nurl = 'https://api.byautomata.io/search?terms=cloud+computing,enterprise,security'\npayload = {}\nheaders = {\n  'x-api-key': 'api_key'\n}\n\nresponse = requests.request('GET', url, headers=headers, data = payload)\nprint(response.text.encode('utf8'))"
          },
          {
            "lang": "PHP",
            "source": "$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.byautomata.io/search?terms=cloud+computing,enterprise,security\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST =>\"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"x-api-key: api-key\"\n  ),\n));\n\n$response = curl_exec($curl);\ncurl_close($curl);\necho $response;"
          },
          {
            "lang": "NodeJs",
            "source": "var request = require('request');\nvar options = {\n  'method': 'GET',\n  'url': 'https://api.byautomata.io/search?terms=cloud+computing,enterprise,security',\n  'headers': {\n    'x-api-key': 'api_key'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});"
          },
          {
            "lang": "cURL",
            "source": "curl --location --request GET 'https://api.byautomata.io/search?terms=cloud+computing,enterprise,security' \\\n--header 'x-api-key: api-key'"
          },
          {
            "lang": "Shell",
            "source": "wget --no-check-certificate --quiet \\\n  --method GET \\\n  --timeout=0 \\\n  --header 'x-api-key: 9OEDkaENEd2dzyF14fzcL73WQ5c8ifbX3waYbmhY' \\\n  'https://api.byautomata.io/search?terms=cloud+computing,enterprise,security'"
          }
        ]
      }
    },
    "/contentpro-similar-text": {
      "post": {
        "operationId": "searchSimilarText",
        "tags": [
          "contentpro-similar-text"
        ],
        "summary": "The /contentpro-similar-text endpoint accepts and arbitrary piece of text and returns similar articles and blogs written by companies.",
        "responses": {
          "200": {
            "description": "A successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimilarTextResponse"
                }
              }
            }
          },
          "400": {
            "description": "Your request was not valid. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "403": {
            "description": "Invalid API Key. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "501": {
            "description": "There was a server error. Please try again later or contact support@byautomata.io",
            "content": {}
          }
        },
        "deprecated": false,
        "x-code-samples": [
          {
            "lang": "Python",
            "source": "import requests\n\nurl = 'https://api.byautomata.io/contentpro-similar-text'\npayload = {'text': 'some sample text about cloud computing and internet security'}\nheaders = {\n  'x-api-key': 'api_key'\n}\n\nresponse = requests.request('POST', url, headers=headers, data = payload)\nprint(response.text.encode('utf8'))"
          },
          {
            "lang": "PHP",
            "source": "$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.byautomata.io/contentpro-similar-text\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST =>\"POST\",\n  CURLOPT_HTTPHEADER => array(\n    \"x-api-key: api-key\"\n  ),\n));\n\n$response = curl_exec($curl);\ncurl_close($curl);\necho $response;"
          },
          {
            "lang": "NodeJs",
            "source": "var request = require('request');\nvar options = {\n  'method': 'POST',\n  'url': 'https://api.byautomata.io/contentpro-similar-text',\n  'headers': {\n    'x-api-key': 'api_key'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});"
          },
          {
            "lang": "cURL",
            "source": "curl --location --request POST 'https://api.byautomata.io/contentpro-similar-text' \\\n--header 'x-api-key: api-key'"
          },
          {
            "lang": "Shell",
            "source": "wget --no-check-certificate --quiet \\\n  --method POST \\\n  --timeout=0 \\\n  --header 'x-api-key: 9OEDkaENEd2dzyF14fzcL73WQ5c8ifbX3waYbmhY' \\\n  'https://api.byautomata.io/contentpro-similar-text'"
          }
        ]
      }
    },
    "/contentpro-search": {
      "get": {
        "operationId": "searchContent",
        "tags": [
          "contentpro-search"
        ],
        "summary": "Send search terms to receive the most relevant articles and companies.",
        "parameters": [
          {
            "name": "terms",
            "in": "query",
            "description": "We provide information about related companies and articles based on the search terms you provide. Separate search terms with commas. Ex. https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentSearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Your request was not valid. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "403": {
            "description": "Invalid API Key. Please refer to the API documentation https://api-specs.byautomata.io.",
            "content": {}
          },
          "501": {
            "description": "There was a server error. Please try again later or contact support@byautomata.io",
            "content": {}
          }
        },
        "deprecated": false,
        "x-code-samples": [
          {
            "lang": "Python",
            "source": "import requests\n\nurl = 'https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security'\npayload = {}\nheaders = {\n  'x-api-key': 'api_key'\n}\n\nresponse = requests.request('GET', url, headers=headers, data = payload)\nprint(response.text.encode('utf8'))"
          },
          {
            "lang": "PHP",
            "source": "$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_URL => \"https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 0,\n  CURLOPT_FOLLOWLOCATION => true,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST =>\"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"x-api-key: api-key\"\n  ),\n));\n\n$response = curl_exec($curl);\ncurl_close($curl);\necho $response;"
          },
          {
            "lang": "NodeJs",
            "source": "var request = require('request');\nvar options = {\n  'method': 'GET',\n  'url': 'https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security',\n  'headers': {\n    'x-api-key': 'api_key'\n  }\n};\nrequest(options, function (error, response) {\n  if (error) throw new Error(error);\n  console.log(response.body);\n});"
          },
          {
            "lang": "cURL",
            "source": "curl --location --request GET 'https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security' \\\n--header 'x-api-key: api-key'"
          },
          {
            "lang": "Shell",
            "source": "wget --no-check-certificate --quiet \\\n  --method GET \\\n  --timeout=0 \\\n  --header 'x-api-key: 9OEDkaENEd2dzyF14fzcL73WQ5c8ifbX3waYbmhY' \\\n  'https://api.byautomata.io/contentpro-search?terms=cloud+computing,enterprise,security'"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "SimilarCompany": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "employee": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          }
        },
        "xml": {
          "name": "Order"
        }
      },
      "SimilarCompanySearch": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "employee": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          },
          "snippets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Snippet"
            }
          }
        },
        "xml": {
          "name": "Order"
        }
      },
      "SimilarCompanyResponse": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimilarCompany"
            }
          },
          "input_company": {
            "$ref": "#/components/schemas/InputCompany"
          },
          "count_remaining": {
            "type": "string"
          },
          "calls_per_month": {
            "type": "string"
          },
          "renewal_date": {
            "type": "string"
          }
        }
      },
      "Snippet": {
        "type": "object",
        "properties": {
          "description": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "title": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "InputCompany": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "employee": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          }
        }
      },
      "Article": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "pubdate": {
            "type": "string"
          },
          "link": {
            "type": "string"
          }
        },
        "xml": {
          "name": "Order"
        }
      },
      "ContentProCompany": {
        "type": "object",
        "properties": {
          "companyName": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "employee": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "linkedin": {
            "type": "string"
          },
          "twitter": {
            "type": "string"
          }
        },
        "xml": {
          "name": "Order"
        }
      },
      "ContentProSnippets": {
        "type": "object",
        "properties": {
          "description": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "title": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimilarCompanySearch"
            }
          },
          "count_remaining": {
            "type": "string"
          },
          "calls_per_month": {
            "type": "string"
          },
          "renewal_date": {
            "type": "string"
          }
        }
      },
      "SimilarTextResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "article": {
                  "$ref": "#/components/schemas/Article"
                },
                "company": {
                  "$ref": "#/components/schemas/ContentProCompany"
                },
                "snippets": {
                  "$ref": "#/components/schemas/ContentProSnippets"
                }
              }
            }
          },
          "count_remaining": {
            "type": "string"
          },
          "calls_per_month": {
            "type": "string"
          },
          "renewal_date": {
            "type": "string"
          }
        }
      },
      "ContentSearchResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "article": {
                  "$ref": "#/components/schemas/Article"
                },
                "company": {
                  "$ref": "#/components/schemas/ContentProCompany"
                },
                "snippets": {
                  "$ref": "#/components/schemas/ContentProSnippets"
                }
              }
            }
          },
          "count_remaining": {
            "type": "string"
          },
          "calls_per_month": {
            "type": "string"
          },
          "renewal_date": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "description": "All Automata API endpoints require an API key distributed by Automata. Retrieve an API key at https://apis.byautomata.io for the /similar and /search endpoints. The ContentPro API endpoints are not included in the standard Market Intelligence API plans. Contact support@byautomata.io for access.",
        "name": "x-api-key",
        "in": "header",
        "x-ballerina-apikey-description": "Provide your API Key as x-api-key. Eg: {x-api-key : <Your API Key>}"
      }
    }
  }
}