• Getting Started

Getting Started

Fetch All Instagram Posts Service

This service enables you to retrieve all posts from a user, including captions, publish dates, like counts, and comment counts.

Request

curl --location 'api.onlyup.ir/api/v1/instagram/media/post?user_id=13460080&page_id=&safe_int=true' \
--header 'Authorization: Bearer {token}'

Response

{
    "statusCode": 200,
    "message": "Profile Fetch is successful",
    "data": {
        "ins": {
                "response": {[Object Object]},
                "next_page_id": "3679808797984365714_306787899"
        }
    }
}

“test” is a placeholder for the actual response data structure, which will contain the Instagram posts.

Parameters

ParameterTypeDescription
user_idstringThe unique identifier of the Instagram user whose posts you want to fetch.
page_idstringThe page ID for pagination. If not provided, the service will fetch the first page of posts.
safe_intbooleanIf true, the service will return integers as strings to avoid precision issues. Default is true.
tokenstringThe authorization token for accessing the Instagram API. This is required for authentication.

Notes

  • Ensure that the user_id is valid and corresponds to an existing Instagram user.
  • The page_id parameter is optional. If not provided, the service will return the first page of posts.
  • The safe_int parameter is set to true by default to handle large integers safely. You can set it to false if you prefer standard integer handling.
  • The Authorization header must include a valid Bearer token for authentication.
  • The response will include a next_page_id field, which can be used for pagination to fetch subsequent pages of posts.
  • The response object will contain the actual Instagram posts data, including captions, publish dates, like counts, and comment counts.
  • This service is designed to handle large datasets efficiently, ensuring that you can retrieve all posts without performance issues.
  • The service is built to be robust and handle errors gracefully, returning appropriate error messages if the request fails or if there are issues with the provided parameters.
  • Make sure to handle the response data appropriately in your application, especially if you are displaying it to users or processing it further.
  • This service is part of a larger API that may include other endpoints for interacting with Instagram data, such as fetching user profiles, comments, and more.
  • The service is designed to be scalable and can handle multiple requests simultaneously, making it suitable for applications with high traffic or large user bases.
  • Always check the API documentation for any updates or changes to the parameters and response structure.
  • The service is built with security in mind, ensuring that sensitive data is handled appropriately and that access is restricted to authorized users only.
  • If you encounter any issues while using this service, please refer to the troubleshooting section in the API documentation or contact support for assistance.
  • This service is intended for developers who need to integrate Instagram post retrieval functionality into their applications, providing a seamless way to access user-generated content.
  • The service is optimized for performance, ensuring quick response times even when fetching large volumes of data.
  • Make sure to test the service thoroughly in your development environment before deploying it to production, especially if you are using it in a live application.
  • The service supports various programming languages and frameworks, making it easy to integrate into your existing codebase.
  • The service is compliant with Instagram's API usage policies, ensuring that you can use it without violating any terms of service.
  • Always keep your API keys and tokens secure, and do not expose them in public repositories or client-side code.
  • The service is designed to be user-friendly, with clear error messages and documentation to help you get started quickly.
  • You can use this service to build applications that require access to Instagram posts, such as social media analytics tools, content management systems, or user engagement platforms.
Edit this page on GitHub

OnlyUp