Skip to main content
Glama

Instagram: Search posts by keyword or hashtag

instagram_search
Read-onlyIdempotent

Search public Instagram posts and Reels by keyword or hashtag. Returns media links, captions, publish times, engagement counts and owner details, with nextCursor for more results. Search results reflect Instagram’s ranking and available content. Read-only: returns public data and changes nothing. Costs 1 credit per request.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "count": "<count>"
    },
    "name": "instagram_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
countYesNumber of results to return (1–10). Defaults to 10.
queryYes
cursorNoThe previous response's `nextCursor`, to fetch the next page. Omit it for the first page.
cacheOnlyNoReturn only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
cacheMaxAgeHoursNoAccept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cacheMaxAgeHours
      Added value: +{
      +  "description": "Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / cacheOnly
      Added value: +{
      +  "description": "Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, and the description partly restates them ('Read-only: returns public data and changes nothing'). Beyond that, it adds genuinely new behavioral context: results reflect Instagram's ranking, pagination continues via nextCursor, and each request costs 1 credit. The credit cost and ranking caveat are exactly the kind of context annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with purpose, then return shape, then caveats (ranking, read-only, cost). The 'Read-only: returns public data and changes nothing' clause largely duplicates the readOnlyHint annotation and is the one line that does not fully earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by enumerating returned fields (media links, captions, publish times, engagement counts, owner details) and the pagination handle. Combined with the cost note and the 80% schema coverage, an agent has what it needs to call this correctly; the only gap is the absence of routing guidance versus sibling search tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 80%, so the schema already documents most parameters in depth, including cacheOnly and cacheMaxAgeHours. The description adds only a brief pointer that nextCursor yields more results, and says nothing about the 1-10 count limit or the caching flags, which is consistent with the baseline for well-covered schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Search public Instagram posts and Reels by keyword or hashtag'), which immediately separates it from user-, location-, or tagged-focused siblings such as instagram_search_users and instagram_location_posts. It stops short of naming any sibling explicitly, so the differentiation is inferential rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by 'by keyword or hashtag', which tells an agent the input shape but not the decision rule. There is no statement about when to prefer this over instagram_tagged_posts, instagram_location_posts, or instagram_search_users, and no exclusions or prerequisites are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources