Actions7
Overview
The Instagram Private API node for n8n allows you to interact with Instagram using its private (unofficial) API.
For the "Search User" operation, this node enables you to search for an Instagram user by their username and retrieve detailed information about that user.
Common scenarios:
- Automating workflows that require looking up Instagram users by username.
- Enriching data with Instagram profile details for marketing or research purposes.
- Validating if a username exists on Instagram before performing further actions.
Example use cases:
- Given a list of usernames, fetch their Instagram profile info and store it in a database.
- Check if a specific username is available or already taken on Instagram.
Properties
| Display Name | Type | Description |
|---|---|---|
| Username | String | Username to search for. |
- Username: The Instagram username you want to look up. This field is required for the "Search User" operation.
Output
The output is a JSON object with the following structure:
{
"success": true,
"username": "<searched_username>",
"sessionData": { /* session-related data, opaque */ },
"user": {
/* Instagram user object as returned by the API */
}
}
- success: Boolean indicating if the operation was successful.
- username: The username that was searched.
- sessionData: Session information used for authentication (opaque; typically not needed unless managing sessions).
- user: The full user object returned by Instagram's private API, containing details such as user ID, full name, profile picture URL, privacy status, etc.
If the user is not found or an error occurs, the output will include:
{
"success": false,
"error": "<error message>"
}
Dependencies
- External Service: Requires access to Instagram via the instagram-private-api library.
- Credentials: You must provide valid Instagram credentials (username, password, and optionally session data) in n8n.
- n8n Configuration: No special configuration beyond setting up the credentials is required.
Troubleshooting
Common issues:
- Invalid Credentials: If your Instagram username or password is incorrect, authentication will fail.
- Checkpoint Required: Instagram may require additional verification (e.g., two-factor authentication or checkpoint challenge).
- User Not Found: If the username does not exist, you'll receive an error stating the user was not found.
- Session Expiry: If the session data is outdated, the node will attempt to re-authenticate.
Error messages and resolutions:
"Username is required": Ensure you have provided a value for the Username property."Login required. Please authenticate with Instagram first.": Your session has expired or is invalid. Update your credentials or re-authenticate."Checkpoint required. Please verify your account.": Log in to Instagram manually and complete any required verification steps."User \"<username>\" not found.": Double-check the spelling of the username.