Discover posts by account URL
Create a new account search
Collect posts from a specific account by providing the account URL. The results include posts published by the account, along with detailed metadata such as engagement metrics, timestamps, and author details.
Base URL
POST https://instagram-scraper-api.datashake.com/v1/search
Request payload
callback_url
Field type: string
Required: true
Description: A URL to receive API results via a JSON POST request.
url
Field type: string
Required: true
Description: Instagram account URL.
external_identifier
Field type: string
Required: false
Description: A custom identifier for tracking your request. This value will be included in the callback payload.
limit
Field type: integer
Required: false
Default value: 1000
Description: Maximum number of posts that a search can return.
Code example
curl --location 'https://instagram-scraper-api.datashake.com/v1/search' --header 'x-api-key: your-api-key' --header 'Content-Type: application/json' --request POST --data '{"url": "https://www.instagram.com/beyonce/", "callback_url": "https://example.com/callback", "external_identifier": "my-custom-id", "limit": 30}'
import requests
url = "https://instagram-scraper-api.datashake.com/v1/search"
payload = {
"url": "https://www.instagram.com/beyonce/",
"callback_url": "https://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 30
}
headers = {
"x-api-key": "your-api-key",
}
response = requests.post(url=url, headers=headers, json=payload)
Response and callback payload
API response example
{
"status": "created",
"message": "Your request was successfully submitted.",
"request_id": "1742515679047322765-7538bd54-2bd7-45"
}
Callback payload example
{
"request_id": "1742515679047322765-7538bd54-2bd7-45",
"status": "completed",
"credits_used": 130,
"request_metadata": {
"url": "https://www.instagram.com/beyonce/",
"callback_url": "http://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 30
},
"results": [
{
"unique_id": "3568202215719182069",
"post_id": "DGEzQKStB71",
"description": "Sweet like honey. #CELUMIERE",
"hashtags": [
"CELUMIERE"
],
"url": "https://www.instagram.com/p/DGEzQKStB71/",
"comments_count": 12199,
"likes_count": 381524,
"view_count": 1985823,
"play_count": 7092496,
"upload_date": "2025-02-15",
"author": {
"username": "beyonceparfums",
"name": "BEYONCÉ PARFUMS",
"id": "62479994608",
"profile_picture_url": null
},
"tagged_users": {
"username": "beyonce",
"name": "Beyoncé",
"id": "247944034"
},
"media": [
{
"type": "video",
"thumbnail_url": "https://scontent-mia3-3.cdninstagram.com/v/t51.2885-15/480169950_17910420660082609_2437802121761773417_n.jpg?stp=dst-jpg_e15_fr_p1080x1080_tt6&_nc_ht=scontent-mia3-3.cdninstagram.com&_nc_cat=101&_nc_oc=Q6cZ2QED6FkQetdyaUdQ0N_LdYlnIWjC4pO3EAkXeH07dvaJ310NsU3YQAMwY-7oDBM62KI&_nc_ohc=Zpd7B9MCoQkQ7kNvgGmrS1o&_nc_gid=WE9CuPT3dK8CtBPiHp6CIA&edm=APs17CUBAAAA&ccb=7-5&oh=00_AYEqJl3Prg5OQ5nPbiCpoB_RWouVhFci56_ho_IPERM2oA&oe=67F1B91B&_nc_sid=10d13b",
"url": "https://scontent-mia3-3.cdninstagram.com/o1/v/t16/f2/m86/AQOwKt9yilEm77H8JT7XAlClTD77exjqtgnhMaeVHqUrqaZv0aadx5bOHf0_jcrZzGL8ZQsMd6oEBr752dhGLp_Jp_RGvAoUQDBKeQE.mp4?stp=dst-mp4&efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uY2xpcHMuYzIuNzIwLmJhc2VsaW5lIn0&_nc_cat=109&vs=550060851395504_1323146712&_nc_vs=HBksFQIYUmlnX3hwdl9yZWVsc19wZXJtYW5lbnRfc3JfcHJvZC8wRjQ1RDUxMjhFQkNCQjkwNjc2ODY0NUM3OTQ3QzlCMl92aWRlb19kYXNoaW5pdC5tcDQVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dGZGRuQnczamlxZlZhNEJBS2taZm9kcF9ieDNicV9FQUFBRhUCAsgBACgAGAAbABUAACbSuOu%2BxeurQRUCKAJDMywXQECUOVgQYk4YEmRhc2hfYmFzZWxpbmVfMV92MREAdf4HAA%3D%3D&_nc_rid=846f0570b2&ccb=9-4&oh=00_AYEYTCMCUcRSn4pB7RkMqt5oWVMnL_iEgNCpoSDeCex6hw&oe=67EDB29E&_nc_sid=10d13b",
"id": null,
}
],
"created_at": "2025-03-21T00:08:07.793135Z",
"updated_at": "2025-03-21T00:08:07.793136Z",
},
...
],
"summary": {
"total_posts": 30,
"unique_user_count": 1
},
"pagination": {
"total": 30,
"page": 1,
"per_page": 50,
"total_pages": 1
}
}
Get search results
Use this endpoint to retrieve results in a synchronous manner.
Note that this endpoint is not intended for polling - make sure to check if your request has completed before calling it.
Base URL
GET https://instagram-scraper-api.datashake.com/v1/search/:request_id
Path parameters
request_id
Field type: string
Required: true
Description: The unique identifier for the request.
Request parameters
page
Field type: integer
Required: false
Description: The page number of the results to retrieve.
per_page
Field type: integer
Required: false
Description: The number of results to retrieve per page.
Code example
curl --location 'https://instagram-scraper-api.datashake.com/v1/search/1742546457946506999-897b27cc-acd7-4a?page=1&per_page=10' --header 'x-api-key: your-api-key'
import requests
url = "https://instagram-scraper-api.datashake.com/v1/search/1742546457946506999-897b27cc-acd7-4a"
params = {
"page": 1,
"per_page": 10
}
headers = {
"x-api-key": "your-api-key",
}
response = requests.get(url=url, headers=headers, params=params)
Response
API response example
{
"request_id": "1742515679047322765-7538bd54-2bd7-45",
"status": "completed",
"credits_used": 130,
"request_metadata": {
"url": "https://www.instagram.com/beyonce/",
"callback_url": "http://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 30
},
"results": [
{
"unique_id": "3568202215719182069",
"post_id": "DGEzQKStB71",
"description": "Sweet like honey. #CELUMIERE",
"hashtags": [
"CELUMIERE"
],
"url": "https://www.instagram.com/p/DGEzQKStB71/",
"comments_count": 12199,
"likes_count": 381524,
"view_count": 1985823,
"play_count": 7092496,
"upload_date": "2025-02-15",
"author": {
"username": "beyonceparfums",
"name": "BEYONCÉ PARFUMS",
"id": "62479994608",
"profile_picture_url": null
},
"tagged_users": {
"username": "beyonce",
"name": "Beyoncé",
"id": "247944034"
},
"media": [
{
"type": "video",
"thumbnail_url": "https://scontent-mia3-3.cdninstagram.com/v/t51.2885-15/480169950_17910420660082609_2437802121761773417_n.jpg?stp=dst-jpg_e15_fr_p1080x1080_tt6&_nc_ht=scontent-mia3-3.cdninstagram.com&_nc_cat=101&_nc_oc=Q6cZ2QED6FkQetdyaUdQ0N_LdYlnIWjC4pO3EAkXeH07dvaJ310NsU3YQAMwY-7oDBM62KI&_nc_ohc=Zpd7B9MCoQkQ7kNvgGmrS1o&_nc_gid=WE9CuPT3dK8CtBPiHp6CIA&edm=APs17CUBAAAA&ccb=7-5&oh=00_AYEqJl3Prg5OQ5nPbiCpoB_RWouVhFci56_ho_IPERM2oA&oe=67F1B91B&_nc_sid=10d13b",
"url": "https://scontent-mia3-3.cdninstagram.com/o1/v/t16/f2/m86/AQOwKt9yilEm77H8JT7XAlClTD77exjqtgnhMaeVHqUrqaZv0aadx5bOHf0_jcrZzGL8ZQsMd6oEBr752dhGLp_Jp_RGvAoUQDBKeQE.mp4?stp=dst-mp4&efg=eyJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSIsInZlbmNvZGVfdGFnIjoidnRzX3ZvZF91cmxnZW4uY2xpcHMuYzIuNzIwLmJhc2VsaW5lIn0&_nc_cat=109&vs=550060851395504_1323146712&_nc_vs=HBksFQIYUmlnX3hwdl9yZWVsc19wZXJtYW5lbnRfc3JfcHJvZC8wRjQ1RDUxMjhFQkNCQjkwNjc2ODY0NUM3OTQ3QzlCMl92aWRlb19kYXNoaW5pdC5tcDQVAALIAQAVAhg6cGFzc3Rocm91Z2hfZXZlcnN0b3JlL0dGZGRuQnczamlxZlZhNEJBS2taZm9kcF9ieDNicV9FQUFBRhUCAsgBACgAGAAbABUAACbSuOu%2BxeurQRUCKAJDMywXQECUOVgQYk4YEmRhc2hfYmFzZWxpbmVfMV92MREAdf4HAA%3D%3D&_nc_rid=846f0570b2&ccb=9-4&oh=00_AYEYTCMCUcRSn4pB7RkMqt5oWVMnL_iEgNCpoSDeCex6hw&oe=67EDB29E&_nc_sid=10d13b",
"id": null,
}
],
"created_at": "2025-03-21T00:08:07.793135Z",
"updated_at": "2025-03-21T00:08:07.793136Z",
},
...
],
"summary": {
"total_posts": 30,
"unique_user_count": 1
},
"pagination": {
"total": 30,
"page": 1,
"per_page": 10,
"total_pages": 3
}
}