All Posts

This endpoint allows you to see all the posts in your instagram page (posts that were created by the API or directly on instagram)


Settings:

URL

https://api.99digital.co.il/instagram/page/getPosts

Method

JSON via POST

Header

Your API key for the service


Body:

Parameter

Description / Example

Mandatory

Example

from

The ID you received for the connection

yes

463745743546345

limit

How many posts to get (limit pagination)

between 1 to 100

default if not provided: 25

no

25

type

two options:

media - all posts, rells, videos, carousels

stories - live stories

yes

media

mediaId

If you prefer to get information on one post and not all of them, here is where you put the mediaId

no

5634634_634634563

after

if you are using limit paging, you can provide the "after" value from previous response to load the next batch

no

U56WDF34FA4TER3DA.....


Response:

{
"status": "OK",
"from": "463745743546345",
"type": "media",
"count": 25,
"posts": [{
      "id": "119324881085321_122093459712345",
      "caption": "Hello fans!",
      "media_type": "IMAGE",
      "media_product_type": "FEED",
      "media_url": "https://www.scontent.com/...",
      "permalink": "https://instagram.com/p/...",
      "created_time": "1783596120",
      "thumbnail_url": "https://www.scontent.com/...",
      "children": ["https://www.scontent.com/..."],
      "like_count": 10,
      "comments_count": 3,
      "is_comment_enabled": true
    }],
"paging": { "after": "QVFIU...", "hasNext": true },
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

count

Total posts in this batch

from

Your ID for the service

posts

Array of all posts inside your facebook page

Value

Information

id

This is the postId

caption

The body of the post

media_type

IMAGE/VIDEO/CAROUSEL_ALBUM

media_product_type

FEED/REELS/STORY

media_url

Link to the media

permalink

Link directly to the post

thumbnail_url

Thumbnail image link (only for videos)

created_time

The post create time. UNIX UTC timestamp (int seconds)

like_count

The total likes of the post

comments_count

The total amount of comments this post has (int)

for getting the actual comments, use the getComments api endpoint

is_comment_enabled

true or false

children

List of media url for carousel items (media_type = CAROUSEL_ALBUM)

paging

key that contains two values: "after" that represents the parameter if you wish to get the next batch.

"hasNext" can have true if you have more data to load or false if this is the last data

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Your "from" number account does not exist, or JSON syntax error

3

wrong apiKey

5

Missing or invalid content. the 'body'

6

Wrong connection type. you keys/id is correct but you are using the wrong endpoint

(for example: your onboarding was for facebook messenger but you are using this facebook posts endpoint)

7

Onboarding still in progress

10

You must do onboarding again, the connection has expired

12

Rate limit error. too many requests. please wait few minutes and try again

13

The postId is invalid or wrong

15

The content you posted was rejected by meta or bad media / format / size. could also indicate policy violation inside the content.

16

General error, try again


Stories

For "stories" type from the table above, only those will return in the response: id, media_type, media_url, permalink, created_time