The Instagram Scraper is a sophisticated tool designed to extract and organize content from one of the world's most popular visual social media platforms. This powerful scraper offers an efficient method to collect posts, comments, user data, and engagement metrics, providing valuable insights for various industries and applications.
Data Point | Description | Example |
---|---|---|
Post ID | Unique identifier for the post | 3442439173304778536 |
User Information | Details about the post author | Username, follower count, verification status |
Content | Text of the post or comment | [Full text content] |
Date Posted | When the content was published | 2024-08-25T12:59:56.000Z |
Engagement Metrics | Likes, comments, video views | 156 likes, 12 comments |
Multimedia | Links to photos and videos | [URLs to media files] |
Comments | User comments and replies | [Detailed comment data] |
Tagged Users | Users mentioned in the post | [List of tagged usernames] |
The Instagram Scraper is a valuable asset for various sectors, including:
The Instagram Scraper API allows you to extract various types of information from Instagram, including comments, posts, profiles, and reels. This powerful tool enables developers to integrate Instagram data into their applications for social media analysis, content discovery, and more.
To use the Instagram Scraper API, you'll need to authenticate your requests using your API key. The API provides several endpoints for retrieving different types of information:
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
The request body should be a JSON object with the following structure, depending on the endpoint:
// For URL-based endpoints (comments, posts, profiles, reels)
{
"url": "https://www.instagram.com/p/post-id/"
}
// For posts-by-keyword endpoint
{
"keyword": "travel"
}
// For posts-by-profile and reels-by-profile endpoints
{
"url": "https://www.instagram.com/username/"
}
Please note that usage is subject to rate limiting. Refer to your plan details for specific limits.
While we don't have a specific sample response, you can generally expect the API to return data including:
The exact structure and fields may vary based on the information available for each type of content.
import requests
import json
# Your API Key
api_key = 'YOUR_API_KEY'
# API Endpoint for post information
url = 'https://taskagi.net/api/instagram-scraper/posts'
# Headers
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
# Request Body
data = {
'url': 'https://www.instagram.com/p/example-post-id/'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
post_info = response.json()
# Print the post information
print(json.dumps(post_info, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
# Example for posts by keyword
url = 'https://taskagi.net/api/instagram-scraper/posts-by-keyword'
# Request Body for keyword search
data = {
'keyword': 'travel'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
posts = response.json()
# Print the posts
print(json.dumps(posts, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)