Instagram AI Posting Agent This is a Node.js application that automatically generates and posts content to Instagram using AI. It uses free tools including Google's Gemini AI and Unsplash for images.
# Instagram AI Posting Agent
This is a Node.js application that automatically generates and posts content to Instagram using AI. It uses free tools including Google's Gemini AI and Unsplash for images.
## Preview
Here are some examples of posts created with this tool:


## Features
- AI-generated captions and hashtags using Gemini AI
- Automatic image sourcing from Unsplash
- Image processing to Instagram's recommended dimensions
- Scheduling functionality for automated posting
- Topic rotation from customizable list
## Prerequisites
- Node.js v14+ installed
- Instagram account
- Gemini AI API key
- Unsplash API key
## Setup
1. Clone or download this repository
2. Install dependencies:
```bash
npm install
```
3. Create a `.env` file in the root directory with:
```
INSTAGRAM_USERNAME=your_instagram_username
INSTAGRAM_PASSWORD=your_instagram_password
GEMINI_API_KEY=your_gemini_api_key
UNSPLASH_ACCESS_KEY=your_unsplash_access_key
UNSPLASH_SECRET_KEY=your_unsplash_secret_key
UNSPLASH_APP_ID=your_unsplash_app_id
```
## Usage
### Single Post
To create a single post about a specific topic:
```bash
node index.js "your topic here"
```
For example:
```bash
node index.js "sustainable living"
```
### Scheduled Posting
To start the scheduler:
```bash
node scheduler.js
```
This will set up a posting schedule (default: every 24 hours).
To immediately create a post and start the schedule:
```bash
node scheduler.js --post-now
```
### Customizing Topics
The scheduler rotates through a list of topics. The default topics are included, but you can customize them by creating a `topics.json` file:
```json
{
"topics": [
"topic 1",
"topic 2",
"topic 3",
"..."
]
}
```
## Important Notes
- **Instagram API Usage**: This project uses the unofficial Instagram Private API. This may violate Instagram's terms of service. Use responsibly and at your own risk.
- **Rate Limiting**: To avoid accounGoogle's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.