# arxiv-api

> node wrapper for arXiv api

Latest version **1.1.1** (published 2020-06-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install arxiv-api
pnpm add arxiv-api
yarn add arxiv-api
bun add arxiv-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2020-06-20 |
| First published | 2020-03-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.10.0 |
| Dependencies | 3 |
| Unpacked size | 26.9 KB |
| Known vulnerabilities | 0 (+32 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 15 |
| Author | elior avraham |
| Maintainers | eliorav |
| Keywords | arxiv, node, javascript |

## Links

- npm: https://www.npmjs.com/package/arxiv-api
- Repository: https://github.com/eliorav/arXiv-api
- Homepage: https://github.com/eliorav/arXiv-api#readme
- Issues: https://github.com/eliorav/arXiv-api/issues
- npm.io page: https://npm.io/package/arxiv-api

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) 0.19.2
- [lodash](https://npm.io/package/lodash.md) 4.17.15
- [xml2js](https://npm.io/package/xml2js.md) 0.4.23

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2020-06-20
- 1.1.0 — 2020-03-27
- 1.0.0 — 2020-03-26

## README

<p align="center">
  <h3 align="center">arXiv-api</h3>

  <p align="center">
    A Javascript wrapper of arxiv api.
  </p>
</p>

## Getting Started
### Installation

```sh
npm i arxiv-api
```

### Usage example

#### Using async/await
```js
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
```js
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.
		* name - The name of the tag.
		* prefix - one of the [arXiv supporting prefixes](https://arxiv.org/help/api/user-manual#51-details-of-query-construction)
	* 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 – elior.av@gmail.com

---
_Source: https://npm.io/package/arxiv-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
