Get Info 💻
Retrieve user web profile information by username.
Note: Please be aware that the responses from Get Info 💻
and Get Info by id 📱 endpoints are different.
Params
Name | Type | Default | Description |
---|---|---|---|
username (required) | string | – | Username |
Usage
- Python
- PHP
- cURL
from rocketapi import InstagramAPI
instagram_api = InstagramAPI(token="your-api-key")
print(instagram_api.get_user_info("kyliejenner"))
<?php
require('vendor/autoload.php');
use RocketAPI\InstagramAPI;
$api = new InstagramAPI('your-api-key');
$username = 'kanyewest';
try {
$user = $api->getUserInfo($username);
print_r($user);
} catch (RocketAPI\Exceptions\NotFoundException $e) {
echo "User $username not found\n";
} catch (RocketAPI\Exceptions\BadResponseException $e) {
echo "Can't get $username info from API\n";
}
curl --request POST \
--url https://v1.rocketapi.io/instagram/user/get_info \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"username": "kyliejenner"
}'
Response example
Loading...