igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Variable IdAsTextConst

    IdAsText: Schema.decodeTo<
        Schema.String,
        Schema.Union<readonly [Schema.Number, Schema.String]>,
    > = ...

    An id the library hands out is always a string, whatever its length: the schema of an id field in a parsed answer. The response mode of the one reader gives a number of more than 15 digits as its exact text and a shorter one as a number; this turns both into the text of the number, so a caller never meets two shapes for one kind of value.