API Reference

    v1.0.0 ยท updated from bundled OpenAPI

    GET/desearch/instagram/media/{id}

    Retrieve Instagram Media by ID

    Retrieve normalized metadata for a public Instagram media/post by shortcode, ID, or URL. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. For example, `usage_count=10` at `$0.015 / 1,000` resolves to `cost_usd=0.00015`. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Retrieve Instagram Media by ID when your application needs search-grounded AI resultswithout maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /desearch/instagram/media/{id} with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Query Parameters

    idstringrequired

    Instagram media shortcode, ID, or public URL

    Responses

    200A normalized Instagram media object.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error
    429Too Many Requests
    500Internal Server Error
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/desearch/instagram/media/{id}?id=DY79rTVS6OK" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    ResponseSchema
    {
      "id": "3234567890123456789",
      "shortcode": "DY79rTVS6OK",
      "url": "https://www.instagram.com/p/DY79rTVS6OK/",
      "caption": "caption text",
      "createTime": "2024-01-15T10:30:00Z",
      "mediaType": "image",
      "mediaUrl": "https://example.com/media.jpg",
      "thumbnailUrl": "https://example.com/thumb.jpg",
      "author": {
        "id": "12345",
        "username": "instagram",
        "fullName": "Desearch",
        "biography": "Search AI",
        "avatar": "https://example.com/avatar.jpg",
        "verified": true,
        "private": false,
        "followers": 50000,
        "following": 1200,
        "postsCount": 250,
        "externalUrl": "https://desearch.ai",
        "category": "Software"
      },
      "stats": {
        "likeCount": 5000,
        "commentCount": 120,
        "viewCount": 120000,
        "playCount": 120000
      },
      "hashtags": [
        "string"
      ],
      "mentions": [
        "string"
      ],
      "children": [
        {}
      ]
    }

    Possible status codes:

    200401422429500