# arXiv API

> Returns arXiv papers by search, identifier, category or author, with metadata for each paper.

Category: Search & Knowledge. Region: global. 5 endpoints at `https://api.hoshime.com/v1/arxiv/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/arxiv
## GET /v1/arxiv/search

Papers that match a search in any field, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Search terms, matched in any field. (e.g. attention is all you need) |
| `sort` | string | no | Order of the results, newest first for the two date orders. (one of relevance, lastUpdatedDate, submittedDate; default relevance) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `categories` (Category[]), `categories[].name` (string), `comment` (string), `doi` (string), `id` (string), `journalRef` (string), `pdfUrl` (string), `primaryCategory` (string), `publishedAt` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/arxiv/search?query=attention+is+all+you+need" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/arxiv/paper

One paper by its arXiv identifier, such as 1706.03762.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | arXiv identifier, with or without a version, such as 1706.03762 or hep-th/9901001. (e.g. 1706.03762) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `categories` (Category[]), `categories[].name` (string), `comment` (string), `doi` (string), `id` (string), `journalRef` (string), `pdfUrl` (string), `primaryCategory` (string), `publishedAt` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/arxiv/paper?id=1706.03762" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/arxiv/papers

Several papers by their arXiv identifiers in one call, up to 50, such as 1706.03762,1810.04805. Unknown identifiers are left out.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `ids` | string | yes | Comma-separated arXiv identifiers, with or without versions, up to 50. (e.g. 1706.03762,1810.04805) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `categories` (Category[]), `categories[].name` (string), `comment` (string), `doi` (string), `id` (string), `journalRef` (string), `pdfUrl` (string), `primaryCategory` (string), `publishedAt` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/arxiv/papers?ids=1706.03762%2C1810.04805" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/arxiv/category

Newest papers of one arXiv category, such as cs.AI, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `category` | string | yes | arXiv category, such as cs.AI, math.CO or q-bio.NC. (e.g. cs.AI) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `categories` (Category[]), `categories[].name` (string), `comment` (string), `doi` (string), `id` (string), `journalRef` (string), `pdfUrl` (string), `primaryCategory` (string), `publishedAt` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/arxiv/category?category=cs.AI" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/arxiv/author

Papers by an author name, newest first, 20 per page.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Author name, such as Ashish Vaswani. (e.g. Ashish Vaswani) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `authors` (Author[]), `authors[].avatarUrl` (string), `authors[].id` (string), `authors[].name` (string), `authors[].url` (string), `authors[].username` (string), `categories` (Category[]), `categories[].name` (string), `comment` (string), `doi` (string), `id` (string), `journalRef` (string), `pdfUrl` (string), `primaryCategory` (string), `publishedAt` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/arxiv/author?name=Ashish+Vaswani" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
