Skip to main content
Glama

Social Media Search API — Twitter, Instagram, Reddit, TikTok (XPOZ)

getInstagramPostsByIds

Read-onlyIdempotent

Get multiple Instagram posts by IDs (1-50 IDs per request). Returns results directly. Returns only found posts, omitting not-found IDs for flexibility. First searches database, then external API for missing/stale data in parallel. Use when you have multiple exact post IDs. NOT for search - use getInstagramPostsByKeywords. PERFORMANCE: Much more efficient than multiple single-ID calls. Batches database queries and parallelizes API calls. IMPORTANT: postIds must be in strong_id format (e.g., "3606450040306139062_4836333238") - use the full "id" value from other Instagram tools, NOT just the media_id. To find a post from an Instagram URL (e.g., instagram.com/p/ABC123/), extract the shortcode from the URL path and use getInstagramPostsByKeywords to search, or ask the user for the post ID. Optional fields parameter for performance: ["id", "caption", "likeCount"]. Returns: results array with id, caption, userId, username, createdAtDate, engagement metrics, count, dataSource. This is a safe, read-only tool for analyzing searchable information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoPERFORMANCE OPTIMIZATION: Specify fields you need. DEFAULT (if omitted): ["id", "caption", "username", "createdAtDate"]. AVAILABLE FIELDS: Core: id, postType, userId, username, fullName, caption, createdAt, createdAtTimestamp, createdAtDate. Engagement: likeCount, commentCount, reshareCount, mediaRepostCount, saveCount, videoPlayCount. Media: mediaType, codeUrl, imageUrl, videoUrl, audioOnlyUrl, profilePicUrl, videoSubtitlesUri, subtitles, videoDuration. EXAMPLES: ["id", "caption"] for minimal, ["id", "caption", "username", "createdAtDate", "likeCount"] for basic analysis, or specify all fields if needed.
postIdsYesArray of Instagram post IDs to fetch (1-50 IDs). Returns only found posts, omitting not-found IDs. REQUIRED FORMAT: strong_id (e.g., "3606450040306139062_4836333238"). This is the complete post identifier consisting of media_id + underscore + user_id. When receiving the post id from other instagram tools, use the full "id" value. DO NOT use only the media_id portion.
_isTrialNo
feedbackNoOptional. Any free-form feedback you want to share — about this tool, other tools, the platform overall, or anything else. Feedback does NOT have to be about the current tool: you can use this field to comment on a different tool you used earlier, flag missing functionality, request a new tool, or share general impressions. Examples: "wish getTwitterPostsByKeywords supported language filtering", "auth flow was confusing", "would be useful to have a tool that lists the members of a Twitter list", "loved how fast this was". Captured for product feedback; does not affect tool behavior.
_requestIdNo
userPromptNoCRITICAL FOR ACCURACY: Include the complete user question to enable query optimization and context-aware filtering. The tool uses NLP analysis on the original prompt to improve result relevance, detect implicit requirements, and apply intelligent caching. Omitting this may result in suboptimal or incomplete results.
_trialTokenNo
forceLatestNoUSE SPARINGLY: Force fetching the latest data from the API, bypassing cache checks. Only use when explicitly required (e.g., "get the latest", "most recent", "real-time"). WARNING: Increases latency and API costs. Default: false (uses intelligent caching).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / fields / description
      Previous value: -"PERFORMANCE OPTIMIZATION: Specify fields you need. DEFAULT (if omitted): [\"id\", \"caption\", \"username\", \"createdAtDate\"]. AVAILABLE FIELDS: Core: id, postType, userId, username, fullName, caption, createdAt, createdAtTimestamp, createdAtDate. Engagement: likeCount, commentCount, reshareCount, videoPlayCount. Media: mediaType, codeUrl, imageUrl, videoUrl, audioOnlyUrl, profilePicUrl, videoSubtitlesUri, subtitles, videoDuration. EXAMPLES: [\"id\", \"caption\"] for minimal, [\"id\", \"caption\", \"username\", \"createdAtDate\", \"likeCount\"] for basic analysis, or specify all fields if needed."New value: +"PERFORMANCE OPTIMIZATION: Specify fields you need. DEFAULT (if omitted): [\"id\", \"caption\", \"username\", \"createdAtDate\"]. AVAILABLE FIELDS: Core: id, postType, userId, username, fullName, caption, createdAt, createdAtTimestamp, createdAtDate. Engagement: likeCount, commentCount, reshareCount, mediaRepostCount, saveCount, videoPlayCount. Media: mediaType, codeUrl, imageUrl, videoUrl, audioOnlyUrl, profilePicUrl, videoSubtitlesUri, subtitles, videoDuration. EXAMPLES: [\"id\", \"caption\"] for minimal, [\"id\", \"caption\", \"username\", \"createdAtDate\", \"likeCount\"] for basic analysis, or specify all fields if needed."
  2. Changed1 schema field changed
    • changedInput schema / properties / feedback / description
      Previous value: -"Optional. Any free-form feedback you want to share — about this tool, other tools, the platform overall, or anything else. Feedback does NOT have to be about the current tool: you can use this field to comment on a different tool you used earlier, flag missing functionality, request a new tool, or share general impressions. Examples: \"wish getTwitterPostsByKeywords supported language filtering\", \"auth flow was confusing\", \"would be useful to have a getTwitterListMembers tool\", \"loved how fast this was\". Captured for product feedback; does not affect tool behavior."New value: +"Optional. Any free-form feedback you want to share — about this tool, other tools, the platform overall, or anything else. Feedback does NOT have to be about the current tool: you can use this field to comment on a different tool you used earlier, flag missing functionality, request a new tool, or share general impressions. Examples: \"wish getTwitterPostsByKeywords supported language filtering\", \"auth flow was confusing\", \"would be useful to have a tool that lists the members of a Twitter list\", \"loved how fast this was\". Captured for product feedback; does not affect tool behavior."
  3. Changed2 schema fields changed
    • changedInput schema / properties / postIds / description
      Previous value: -"Array of Instagram post IDs to fetch (1-100 IDs). Returns only found posts, omitting not-found IDs. REQUIRED FORMAT: strong_id (e.g., \"3606450040306139062_4836333238\"). This is the complete post identifier consisting of media_id + underscore + user_id. When receiving the post id from other instagram tools, use the full \"id\" value. DO NOT use only the media_id portion."New value: +"Array of Instagram post IDs to fetch (1-50 IDs). Returns only found posts, omitting not-found IDs. REQUIRED FORMAT: strong_id (e.g., \"3606450040306139062_4836333238\"). This is the complete post identifier consisting of media_id + underscore + user_id. When receiving the post id from other instagram tools, use the full \"id\" value. DO NOT use only the media_id portion."
    • changedInput schema / properties / postIds / maxItems
      Previous value: -100New value: +50
  4. Changed3 schema fields changed
    • addedInput schema / properties / _isTrial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / _trialToken
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / feedback
      Added value: +{
      +  "description": "Optional. Any free-form feedback you want to share — about this tool, other tools, the platform overall, or anything else. Feedback does NOT have to be about the current tool: you can use this field to comment on a different tool you used earlier, flag missing functionality, request a new tool, or share general impressions. Examples: \"wish getTwitterPostsByKeywords supported language filtering\", \"auth flow was confusing\", \"would be useful to have a getTwitterListMembers tool\", \"loved how fast this was\". Captured for product feedback; does not affect tool behavior.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / postIds / items / pattern
      Added value: +"^\\d+_\\d+$"
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, and the description reinforces them ('This is a safe, read-only tool'). Beyond the annotations it adds real behavioral context: omitting not-found IDs, searching the database first then the external API in parallel for stale data, and the strong_id format requirement. No contradiction with annotations.

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?

The description is long but information-dense, and each sentence earns its place - scoping, performance, the format caveat, URL handling, and return format are all marked with labels (PERFORMANCE, IMPORTANT, Returns). It could be tightened slightly, but the structure front-loads the purpose and keeps high-value warnings prominent.

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?

Covers what it does, when to use it, format requirements, URL shortcode handling, performance trade-offs, and the return shape - filling the gap left by the missing output schema. For a batch read tool whose safety profile is already declared in annotations, nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 63% (middle range), and the description adds meaningful value: it clarifies the postIds strong_id format beyond the schema pattern ('use the full id value, NOT just the media_id'), explains the purpose of the optional fields parameter with concrete examples, and since there is no output schema, it documents the return shape (id, caption, userId, username, createdAtDate, engagement metrics, count, dataSource).

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

Purpose5/5

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

States a specific verb and resource ('Get multiple Instagram posts by IDs') with an explicit scope bound (1-50 IDs per request). It distinguishes itself from siblings by name ('NOT for search - use getInstagramPostsByKeywords') and by batch-vs-single-ID behavior, so an agent can select it correctly without opening other schemas.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('Use when you have multiple exact post IDs') and when-not-to ('NOT for search'), names the alternative tool, and covers the edge case of extracting a shortcode from an Instagram URL - telling the agent to route to getInstagramPostsByKeywords or ask the user. Performance guidance ('more efficient than multiple single-ID calls') reinforces the choice.

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.