# Authentication

[Create an account](https://www.serphouse.com/register) with SERPHouse and Once you confirm your email, you will be able to see an API key on your account dashboard.

#### API Key

The API key for SERPHouse API is available after registration and confirming a email.

In our documentation, We will refer to the API key by using the following syntax:**`<YOUR_API_KEY>`**

Passing the API key as a parameter is  <mark style="color:purple;">**required**</mark>  in order to authorise your requests. Failing to pass an API key or passing an invalid API key will result in an error.

{% hint style="info" %}
**Attention required!** Please note that your API key will directly impact the usage on your subscription plan.&#x20;

In order to prevent unauthorized access to your SERPHouse account, make sure you **store your API key in a secure location** and never include it in any public scripts or files.
{% endhint %}

#### Authentication Examples

A `Bearer Token` is set in the `Authorization` header of every HTTP Request. For example:

<pre class="language-http"><code class="lang-http">POST /serp/live HTTP/1.1
Host: https://api.serphouse.com.com
Authorization: Bearer &#x3C;<a data-footnote-ref href="#user-content-fn-1">YOUR_API_</a>KEY>
Content-Type: application/json
</code></pre>

Alternatevely, Our API allows to authenticate by passing `api_token` as a query string in every HTTP request. See example below

<pre class="language-http"><code class="lang-http">
GET /location/search?q=united&#x26;type=google&#x26;api_token=&#x3C;<a data-footnote-ref href="#user-content-fn-1">YOUR_API_</a>KEY> HTTP/1.1
Host: api.serphouse.com

</code></pre>

#### Example response

```json
{
    "status": "error",
    "msg": "Unauthenticated"
}
```

[^1]:
