Get Web Profile Info π»
Retrieve user web profile information by username.
Note: Please be aware that the responses from Get Web Profile Info π»
and Get Info by id π± endpoints are different.
As of December 2023, this method no longer returns the userβs last 12 publications (the edges[]
array is empty). Please consider using Get User Media / Get User Media by username / Get User Clips to retrieve user publications.
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_web_profile_info \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"username": "kyliejenner"
}'
Response exampleβ
Loading...