GithubHelp home page GithubHelp logo

lgs / arxiv-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eliorav/arxiv-api

0.0 1.0 0.0 458 KB

arXiv-api - A Javascript wrapper of arxiv api.

License: Apache License 2.0

JavaScript 100.00%

arxiv-api's Introduction

arXiv-api

A Javascript wrapper of arxiv api.

Getting Started

Installation

npm i arxiv-api

Usage example

Using async/await

const arxiv = require('arxiv-api');

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

console.log(papers);

Using Promise

const arxiv = require('arxiv-api');

const papers = arxiv
	.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.
    • 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".

Contact

Elior Avraham โ€“ [email protected]

arxiv-api's People

Contributors

eliorav avatar dependabot[bot] avatar beenotung avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.