instagram-private-api icon indicating copy to clipboard operation
instagram-private-api copied to clipboard

Tag feed endpoint 404 / no longer supported

Open adventurist opened this issue 2 years ago • 4 comments

Bug Report

Read the Notes and fill out the form.

Notes

Your issue will be closed if you violate any rule below.

  • You need to include a meaningful section of your code (not your entire project and not a single line).
  • Please do not add screenshots as they're not easy to work with.
  • Errors like IgActionSpamError (feedback_required), IgCheckpointError (challenge_required), checkpont_required, login_required are "common" and there are multiple issues, search here.
  • You can delete this section after reading it.

Form

Requirements

  • [x] I've searched the Issues
  • [x] I've read the basic concepts
  • [x] I'm using the latest version
  • [x] I've debugged my code using the DEBUG variable.

Platform

  • [x] I'm using Node.js version 19.8.1
  • [ ] I'm using electron

Description

The "tag" feed endpoint is no longer in service. <repo>/dist/core/feed.factory.d.ts:24

Code

ig      = new IgApiClient()
// do successful login/sync
const response = await this.ig.feed.tag("animals");
const payload  = await response.items()

Error and Output

[16:24:37.922] ERROR (2667604): GET /api/v1/feed/tag/animals/?rank_token=f503fa57-d84f-5b65-b973-66293f1e78b9 - 404 Not Found; 
    err: {
      "type": "IgNotFoundError",
      "message": "GET /api/v1/feed/tag/animals/?rank_token=f503fa57-d84f-5b65-b973-66293f1e78b9 - 404 Not Found; ",
      "stack":
          IgNotFoundError: GET /api/v1/feed/tag/animals/?rank_token=f503fa57-d84f-5b65-b973-66293f1e78b9 - 404 Not Found; 
              at Request.handleResponseError (/data/stronglogic/kgram/node_modules/instagram-private-api/dist/core/request.js:103:20)
              at Request.send (/data/stronglogic/kgram/node_modules/instagram-private-api/dist/core/request.js:54:28)
              at async TagFeed.request (/data/stronglogic/kgram/node_modules/instagram-private-api/dist/feeds/tag.feed.js:21:26)
              at async TagFeed.items (/data/stronglogic/kgram/node_modules/instagram-private-api/dist/feeds/tag.feed.js:32:26)
    }

Solution/Workaround

Thankfully, the "tags" feed DOES work. Which I learned while troubleshooting just now. Nevertheless, the "tag" feed should be updated or removed.

Thanks for all the great work!

adventurist avatar Jun 14 '23 20:06 adventurist

Can confirm that several endpoints of ig.feed are no longer available

pdahlenburg avatar Jul 21 '23 12:07 pdahlenburg

tags worked for me thank you @adventurist

kentdtran avatar May 10 '24 22:05 kentdtran

@adventurist or @kentdtran When I try the workaround using the "tags" feed, I don't get anything: ig.feed.tags("animals", "top");

When using 'recent', instead of 'top' it works. But I'd like to get the top ones.

This get met this, with no posts:

TagsFeed {
  attemptOptions: {
    delay: 60000,
    factor: 1.5,
    maxAttempts: 10,
    minDelay: 60000,
    maxDelay: 300000,
    jitter: true
  },
  rankToken: 'xxx-xxx-',
  nextMediaIds: [],
  tag: 'animals',
  tab: 'top'
}

Does it still work for you? Do you use another workaround? Could you please share a code snippet?

Thank you very much!

LouisDeconinck avatar Jun 08 '24 07:06 LouisDeconinck