Get Account Details
curl --request GET \
--url https://api.lobstr.io/v1/accounts/{account_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/accounts/{account_hash}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/accounts/{account_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/accounts/{account_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/accounts/{account_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts/{account_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"username": "<string>",
"created_at": "<string>",
"last_synchronization_time": "<string>",
"status": "<string>",
"status_code_info": "<string>",
"status_code_description": "<string>",
"type": "<string>",
"params": {},
"updated_at": {},
"account_type_hash": "<string>",
"squids": [
{}
],
"baseurl": "<string>",
"cookies": [
{}
],
"icon": "<string>"
}Account
Get Account Details
Retrieve detailed information about a specific platform account
GET
/
v1
/
accounts
/
{account_hash}
Get Account Details
curl --request GET \
--url https://api.lobstr.io/v1/accounts/{account_hash} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lobstr.io/v1/accounts/{account_hash}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/accounts/{account_hash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/accounts/{account_hash}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lobstr.io/v1/accounts/{account_hash}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/accounts/{account_hash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"username": "<string>",
"created_at": "<string>",
"last_synchronization_time": "<string>",
"status": "<string>",
"status_code_info": "<string>",
"status_code_description": "<string>",
"type": "<string>",
"params": {},
"updated_at": {},
"account_type_hash": "<string>",
"squids": [
{}
],
"baseurl": "<string>",
"cookies": [
{}
],
"icon": "<string>"
}This endpoint retrieves detailed information about a specific platform account using its hash ID.
Headers
string
required
Your API authentication token. Value:
Token YOUR_API_KEYPath Parameters
string
required
The unique identifier (hash) of the account. Example:
d3e97f2cd33658f301bdbe807402ab30Response Field Explanations
string
Unique account identifier. Example:
"d3e97f2cd33658f301bdbe807402ab30"string
Always “account”. Example:
"account"string
Platform username. Example:
"hashamxcom"string
Account creation timestamp (ISO 8601). Example:
"2024-03-08T15:15:53Z"string
Last successful sync timestamp. Example:
"2024-12-16T10:28:43Z"string
HTTP status code indicating account health. Example:
"200"string
Status information keyword. Example:
"synchronized"string
Human-readable status message. Example:
"Success!"string
Account type identifier. Example:
"twitter-sync"object
Account parameters with default and user-specific settings. Example:
{"default": {}, "user": {}}string | null
Last update timestamp. Example:
nullstring
Reference to account type definition. Example:
"9853173fc00a940a33d7a420c176ad3b"array
Array of squids currently using this account. Example:
[{"name": "Twitter Scraper", "hash_value": "fcd3..."}]string
Platform base URL. Example:
"https://x.com"array
Required cookie specifications. Example:
[{"name": "auth_token", "required": true}]string
Base64 encoded platform icon. Example:
"<base64 image data>"Check the squids array to see which squids are using this account before deleting or updating it.
Monitor the status field regularly. A status of 429 or 401 indicates cookie expiration and requires re-synchronization.
The params object contains both default limits and current user-configured values, useful for understanding account usage.
Code Examples
curl -X GET "https://api.lobstr.io/v1/accounts/d3e97f2cd33658f301bdbe807402ab30" \
-H "Authorization: Token YOUR_API_KEY"
import requests
account_hash = "d3e97f2cd33658f301bdbe807402ab30"
url = f"https://api.lobstr.io/v1/accounts/{account_hash}"
headers = {
"Authorization": "Token YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
data = response.json()
account = data['data'][0]
print(f"Account: {account['username']}")
print(f"Platform: {account['type']}")
print(f"Status: {account['status_code_info']}")
print(f"Last sync: {account['last_synchronization_time']}")
# Check which squids use this account
if account['squids']:
print(f"\nSquids using this account:")
for squid in account['squids']:
print(f" - {squid['name']} ({squid['hash_value']})")
else:
print("\nNo squids using this account")
Response
200
{
"total_results": 1,
"limit": 50,
"page": 1,
"total_pages": 1,
"result_from": 1,
"result_to": 2,
"data": [
{
"id": "d3e97f2cd33658f301bdbe807402ab30",
"object": "account",
"username": "hashamxcom",
"created_at": "2024-03-08T15:15:53Z",
"last_synchronization_time": "2024-12-16T10:28:43Z",
"status": "200",
"status_code_info": "synchronized",
"status_code_description": "Success!",
"type": "twitter-sync",
"params": {
"default": {},
"user": {}
},
"updated_at": null,
"account_type_hash": "9853173fc00a940a33d7a420c176ad3b",
"squids": [
{
"name": "Twitter User Tweets Scraper (2)",
"hash_value": "fcd3fff4053e444b8a98b3660bee8b03"
}
],
"baseurl": "https://x.com",
"cookies": [
{"name": "auth_token", "required": true},
{"name": "ct0", "required": true}
],
"icon": "<base64 image data>"
}
],
"next": null,
"previous": null
}
401
{
"detail": "Invalid token."
}
404
{
"detail": "Not found."
}