# 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]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serphouse.com/introduction/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
