{"id":20857380,"url":"https://github.com/maron09/instagram-api","last_synced_at":"2026-05-22T04:08:11.509Z","repository":{"id":241566681,"uuid":"807058286","full_name":"Maron09/instagram-API","owner":"Maron09","description":"retrieve profile information, retrieve Media url information","archived":false,"fork":false,"pushed_at":"2024-05-28T12:34:39.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-29T03:32:34.567Z","etag":null,"topics":["fastapi","instagram","instagram-api","instagram-metadata","instagram-profile-viewer","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Maron09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-28T12:05:04.000Z","updated_at":"2024-05-29T03:32:42.581Z","dependencies_parsed_at":"2024-05-29T03:32:41.927Z","dependency_job_id":"d5eff4c8-9cd8-4695-8c45-7016817fc6a6","html_url":"https://github.com/Maron09/instagram-API","commit_stats":null,"previous_names":["maron09/instagram-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Maron09/instagram-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maron09%2Finstagram-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maron09%2Finstagram-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maron09%2Finstagram-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maron09%2Finstagram-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maron09","download_url":"https://codeload.github.com/Maron09/instagram-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maron09%2Finstagram-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28095585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-28T02:00:05.685Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","instagram","instagram-api","instagram-metadata","instagram-profile-viewer","python"],"created_at":"2024-11-18T04:38:27.642Z","updated_at":"2025-12-28T07:02:16.654Z","avatar_url":"https://github.com/Maron09.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![9ffeb9de-f118-4fc1-8725-5ec2f075bf8e](https://github.com/Maron09/instagram-API/assets/107930543/43e09586-c841-4ec8-8b63-7e0eac67d82f)\n\n\n# Instagram API\n\n## Overview\n\nInstagram API is a FastAPI-based application that provides various endpoints to interact with Instagram's functionalities, including user authentication, profile information retrieval, post metrics, and media details. The service incorporates middleware for timeout handling and authentication.\n\n## Features\n\n- **User Login:** Authenticate users using their Instagram credentials.\n- **Profile Information:** Retrieve profile information for a given username.\n- **User Posts:** Fetch post metrics for a specified user within optional date ranges.\n- **Media Details:** Obtain details of a specific media post using its URL.\n- **Media Likers:** Get the list of users who liked a particular media post.\n\n## Endpoints\n\n### 1. User Login\n**URL:** `/v1/api/login`  \n**Method:** `POST`  \n**Description:** Authenticates a user with their Instagram credentials.\n\n**Request Body:**\n```json\n{\n  \"username\": \"string\",\n  \"password\": \"string\"\n}\n```\n\n**Response:**\n```json\n{\n  \"message\": \"Login Successful\",\n  \"username\": \"string\"\n}\n```\n\n### 2. Profile Information\n**URL:** `/v1/api/profile`  \n**Method:** `GET`  \n**Description:** Retrieves profile information for a given username.\n\n**Query Parameters:**\n- `username` (required): The username of the profile to retrieve.\n\n**Response:**\n```json\n{\n  \"profile_data\": { /* Profile information */ }\n}\n```\n\n### 3. User Posts\n**URL:** `/v1/api/user_posts`  \n**Method:** `GET`  \n**Description:** Fetches post metrics for a specified user within optional date ranges.\n\n**Query Parameters:**\n- `username` (required): The username to retrieve posts for.\n- `from_date` (optional): Start date for post retrieval (YYYY-MM-DD).\n- `to_date` (optional): End date for post retrieval (YYYY-MM-DD).\n\n**Response:**\n```json\n{\n  \"posts\": [ /* List of posts */ ]\n}\n```\n\n### 4. Media Details\n**URL:** `/v1/api/media`  \n**Method:** `GET`  \n**Description:** Retrieves details of a specific media post using its URL.\n\n**Query Parameters:**\n- `url` (required): The URL of the media to retrieve details for.\n\n**Response:**\n```json\n{\n  \"media_details\": { /* Media details */ }\n}\n```\n\n### 5. Media Likers\n**URL:** `/v1/api/media_likers`  \n**Method:** `GET`  \n**Description:** Gets the list of users who liked a particular media post.\n\n**Query Parameters:**\n- `media_id` (required): The media ID in the format `{post_id}_{owner_id}`.\n- `username` (required): The username of the logged-in user.\n\n**Response:**\n```json\n{\n  \"likers\": [ /* List of likers */ ]\n}\n```\n\n## Middleware\n\n### TimeoutMiddleware\nHandles request timeouts. The timeout is set to 600 seconds.\n\n### AuthenticationMiddleware\nHandles authentication using the Instagram service.\n\n\n\n## Packages Used\nThis project makes use of several third-party libraries:\n* Instaloader: A tool to download pictures (or videos) along with their captions and other metadata from Instagram.\n* Instagpy: An Instagram automation tool.\n* Instagrapi: A fast and effective Instagram Private API wrapper (compatible with Python 3.7+).\n\n\n## Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/maron09/instagram-api.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd instagram-api\n   ```\n3. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n4. Run the application:\n   ```bash\n   fastapi dev main.py\n   ```\n\n## Usage\n\nAccess the API endpoints at `http://127.0.0.1:8000`. Use tools like `curl`, Postman, or any HTTP client to interact with the endpoints.\n\n## Author\n\n**maron09**\n\nGitHub: [maron09](https://github.com/maron09)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaron09%2Finstagram-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaron09%2Finstagram-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaron09%2Finstagram-api/lists"}