Track a brand or campaign hashtag on Instagram
Get Instagram hashtag posts and reels as JSON, with caption, likes, comments and author, to track a campaign, find user content and watch a niche.
You launched a campaign hashtag and want to know who is using it, how well those posts perform, and which ones you can reshare. Searching the tag in the app shows a few posts and no totals. Lovely Router pulls them in bulk. Send hashtag pages, get one JSON object per post, pay per post from a prepaid balance. Call it from a campaign report, a script or an AI agent with one API key. Profile and comment data can identify people, so you are responsible for using it lawfully, including privacy and anti-spam rules.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Track a brand or campaign hashtag on Instagram. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the inputs (links, keywords or accounts) and how many results you need>How it works
List the hashtags
Your campaign tag, your brand tag, and the tags of your niche.
Run the tool with a cap
Send hashtag page URLs in
startUrlstoPOST /v1/tools/instagram-hashtag/run, withmaxItemsininputas the cap. Useuntilto keep posts newer than a date.Rank and follow up
Sort by likes and comments, shortlist the best posts, and credit or ask permission before you reshare.
Get hashtag posts with one request
Instagram hashtag posts takes hashtag pages in startUrls, which return the newest posts. keywords searches words instead of a tag and returns popular reels, and getReels switches the hashtag run to reels only:
curl https://lovelyrouter.com/v1/tools/instagram-hashtag/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"startUrls": [
"https://www.instagram.com/explore/tags/espresso/"
],
"until": "2026-10-01",
"maxItems": 50
},
"max_results": 50
}'Each post carries its caption, likes, comments, author and media. A run still going after 60 seconds returns 202; Run a tool shows how to poll.
What each post holds
| Field group | What you get |
|---|---|
| Content | Caption |
| Engagement | Likes and comments |
| Author | Who posted it |
| Media | Image or video of the post |
Recipes
Pull the newest 200 posts under your tag every Monday. Count posts, sum likes and comments, and list the top five.
Sort tag posts by likes, then ask the authors for permission to reshare the best ones.
Group results by author and list the accounts that post under your category tags most often.
Pass keywords instead of a tag to see the popular reels for a topic you plan content around.
Send captions to a model to pull out the phrases and hashtags that appear together.
Prefer plain words? Connect the MCP server and tell Claude Code or Cursor: "Pull the 100 newest Instagram posts for the hashtag #espresso, rank them by likes and list the top ten with author and caption. Set maxItems and max_results to 100."
Pair it with profile and comment data
A tag run gives you posts. These tools tell you more about the people and the response:
Posts or reels for Instagram hashtags or keywords: caption, likes, comments, author, media.
Instagram profile details by username: bio, followers, posts count, recent posts.
Comments on Instagram posts or reels by URL: text, likes, replies count, author, date.
Search Instagram for users, places or hashtags by keyword.
TikTok videos for keywords or hashtags: caption, views, likes, shares, author, music.
instagram-profilegives the bio and follower count of an author who stands out.instagram-commentsreads the comments under a post that took off.instagram-searchfinds hashtags, users and places by keyword, so you pick the right tags.tiktok-searchruns the same tag research on TikTok.
For the wider workflow, see social listening.
What you pay
You pay per post: starting a run holds its maximum cost, the per-call fee plus the per-post fee times max_results, and the run settles to what it returned. The rest of the hold goes back to your balance. A run that fails or times out pays only for the posts it delivered, and a run refused at the start costs nothing.
Tracking 3 tags with 100 posts each is billed as 300 posts. There is no subscription and no monthly minimum: top up from $5, and one balance pays for tools and models. The card above shows today's price; pricing lists every tool.
Frequently asked questions
Do I get the newest or the top posts?+
A hashtag page returns the newest posts. Search words in keywords return popular reels instead.
Can I get only posts after a date?+
Yes. Set until and only newer posts are returned.
Can I get reels from a hashtag?+
Yes. Set getReels to true for reels only.
How many posts can one run return?+
Up to 500, set with maxItems in input.
Do I need a subscription?+
No. You add credit to a prepaid balance and each run draws it down. Failed runs pay only for the results they delivered, and nothing renews automatically.
Planning the whole campaign? See social listening, influencer research and the tool catalog.