arxiv-api-wrapper - v2.1.2
    Preparing search index...

    Function getArxivEntriesById

    • Fetches arXiv papers by their IDs using the simpler id_list API mode.

      This is a convenience function for the simpler arXiv API mode where you provide a comma-delimited list of paper IDs and get back the data for those papers. It's simpler than using search queries when you already know the paper IDs.

      Parameters

      • ids: string[]

        Array of arXiv paper IDs (e.g., ['2101.01234', '2101.05678']). Maximum 100 IDs allowed.

      • Optionaloptions: {
            rateLimit?: ArxivRateLimitConfig;
            retries?: number;
            timeoutMs?: number;
            userAgent?: string;
        }

        Optional request configuration

        • OptionalrateLimit?: ArxivRateLimitConfig

          Rate limiting configuration to respect arXiv API guidelines

        • Optionalretries?: number

          Number of retry attempts for failed requests (default: 3)

        • OptionaltimeoutMs?: number

          Request timeout in milliseconds (default: 10000)

        • OptionaluserAgent?: string

          Custom User-Agent header for requests

      Returns Promise<ArxivQueryResult>

      Promise resolving to query results with feed metadata and paper entries

      If more than 100 IDs are provided

      If the API request fails after all retries

      If the API returns a non-2xx status code

      If the API returns an empty response

      // Fetch papers by ID
      const result = await getArxivEntriesById(['2101.01234', '2101.05678']);

      result.entries.forEach(entry => {
      console.log(`${entry.arxivId}: ${entry.title}`);
      });
      // With rate limiting
      const result = await getArxivEntriesById(
      ['2101.01234'],
      {
      rateLimit: {
      tokensPerInterval: 1,
      intervalMs: 3000, // 1 request per 3 seconds
      },
      timeoutMs: 15000,
      }
      );