> For the complete documentation index, see [llms.txt](https://docs.serphouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serphouse.com/extra-apis/account-info.md).

# Account Info

Retrieve your account information, With Active plan, Credit usage information and all.

{% hint style="danger" %}
Requires authentication
{% endhint %}

## Get a account information

<mark style="color:blue;">`GET`</mark> `https://api.serphouse.com/account/info`

#### Headers

| Name                                            | Type | Description              |
| ----------------------------------------------- | ---- | ------------------------ |
| Authorization<mark style="color:red;">\*</mark> |      | Bearer \<YOUR\_API\_KEY> |

{% tabs %}
{% tab title="200: OK Successful operation" %}

```json
{
    "status": "success",
    "msg": "",
    "results": {
        "email": "info@serphouse.com",
        "name": "tester",
        "api_key": "zHF0qEUMwZAWWTB3AwzYLmudfdfdLKvabDmxQV6lq86phvoaoZdVyI59osQze",
        "plan": [
            {
                "name": "new 19 may custom plan",
                "plan_type": "custom",
                "price": 140,
                "currency": "INR",
                "credit_available": 1600,
                "credit_total": 1600
            },
            {
                "name": "Daily 22 may plan",
                "plan_type": "monthly",
                "price": 150,
                "currency": "INR",
                "credit_available": 1895,
                "credit_total": 2000
            }
        ]
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthenticated" %}

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

{% endtab %}
{% endtabs %}

## Example request:

{% tabs %}
{% tab title="BASH" %}

```bash
curl --location --request GET 'https://api.serphouse.com/account/info' \
--header 'Authorization: Bearer <YOUR_API_KEY>'
```

{% endtab %}

{% tab title="RUBY" %}

```ruby
require "uri"
require "net/http"

url = URI("https://api.serphouse.com/account/info")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <YOUR_API_KEY>"

response = https.request(request)
puts response.read_body

```

{% endtab %}

{% tab title="PYTHON" %}

```python
import requests

url = "https://api.serphouse.com/account/info"

payload={}
headers = {
  'Authorization': 'Bearer <YOUR_API_KEY>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

{% endtab %}

{% tab title="NODE.JS" %}

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.serphouse.com/account/info',
  headers: { 
    'Authorization': 'Bearer <YOUR_API_KEY>'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$serphouse = new SERPHouse\SERPHouseClient('YOUR_API_KEY');
$res = $serphouse->account->fetch();
echo $res->getResponse();

```

{% endtab %}

{% tab title="JAVA" %}

```java
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
  .url("https://api.serphouse.com/account/info")
  .get()
  .addHeader("Authorization", "Bearer <YOUR_API_KEY>")
  .build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
```

{% endtab %}

{% tab title="JAVASCRIPT" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <YOUR_API_KEY>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.serphouse.com/account/info", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.serphouse.com/account/info"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}

{% tab title="C#/.NET" %}

```csharp
var client = new RestClient("https://api.serphouse.com/account/info");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <YOUR_API_KEY>");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}
