New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arxiv-api-ts

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arxiv-api-ts

node wrapper for arXiv api. typescript version

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

arXiv-api-ts

A Javascript wrapper for the arXiv API.

Getting Started

Installation

npm i arxiv-api-ts

# or

yarn add arxiv-api-ts

Usage example

Using async/await
import search from "arXiv-api-ts";

const papers = await search({
	searchQueryParams: [
		{
			include: [{name: 'RNN'}, {name: 'Deep learning'}],
			exclude: [{name: 'LSTM'}],
		},
		{
			include: [{name: 'GAN'}],
		},
	],
	start: 0,
	maxResults: 10,
});

console.log(papers);
Using Promise
import search from "arXiv-api-ts";

const papers = search({
		searchQueryParams: [
			{
				include: [{name: 'RNN'}, {name: 'Deep learning'}],
				exclude: [{name: 'LSTM'}],
			},
			{
				include: [{name: 'GAN'}],
			},
		],
		start: 0,
		maxResults: 10,
	})
	.then((papers) => console.log(papers))
	.catch((error) => console.log(error));

Documentation

search - ARXIV-API.search({searchQueryParams, sortBy, sortOrder, start = 0, maxResults = 10})

  • searchQueryParams [{include, exclude}] - An array of search temp. Every object in the array represent different search, and the result will be a logical OR between the objects.
    • include [{name, prefix}] - Which tags to include in the search. The result will be a logical AND between the objects.
      • name - The name of the tag.
      • prefix - one of the arXiv supporting prefixes
    • exclude [{name, prefix}] - Which tags to exclude from the search. The result will be a logical AND NOT between the objects. the name and the prefix are the same as in the include fiels.
  • start - The index of the first returned result.
  • maxResults - The number of results returned by the query.
  • sortBy - Can be "relevance", "lastUpdatedDate", "submittedDate".
  • sortOrder - Can be either "ascending" or "descending".

Keywords

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc