Skip to content

apifetch

0.2.0Package record

Token-Authenticated REST API Retrieval Toolkit

1packages depend
1.4Kdownloads / year
88.8%test coverage
13/13flavors OK

Overview

About

A small, dependency-light toolkit for talking to token-authenticated REST APIs. It manages authentication tokens in process environment variables (never written to disk), builds requests with configurable authentication and pagination strategies, and retrieves paginated data either one page at a time or in chunks combined into a single tibble. The design is API-agnostic: a single 'apifetch_api' profile describes an endpoint together with how it authenticates and paginates, so the same verbs work across different services.

Changes in 0.2.0

Bug fixes

  • af_fetch_all() no longer loops forever with af_paginate_none(): an API that cannot be paged is now fetched with a single request.
  • af_fetch_all() now accepts chunk_size = Inf (previously failed with a "missing value" error), and truncates to total_limit when an API returns more rows than requested.
  • parse_queries() (and therefore the query argument of af_fetch()) appends to an endpoint that already has a query string instead of producing a second ?; drops NULL and NA values instead of sending a= or a=NA; repeats a key for multi-valued parameters; and errors clearly on an unnamed list.
  • Integer-like arguments (limit, offset, chunk_size, ...) now reject vectors, NULL, NA, -Inf and values beyond the integer range with a clear message, instead of silently becoming NA or failing cryptically.
Show all changes in 0.2.0Hide the rest of the changes in 0.2.0
  • Token names with accents are sanitized to plain ASCII on every platform (macOS previously produced names such as Sa'ude).
  • af_list_tokens() matches the service prefix literally rather than as a regular expression, and skips empty variables.

Improvements

  • af_store_token() gains overwrite = FALSE, to rotate an expired token.
  • af_fetch() returns an empty tibble for responses without a body (e.g. HTTP 204), gives a token-specific hint on HTTP 401/403, and a clear error when the response is not JSON (e.g. an HTML login or captive-portal page).
  • Added mocked-HTTP tests for af_fetch() and af_fetch_all().
  • Requires 'httr2' >= 1.0.0.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-09-08
  • ERROR12 OK, 1 ERROR2026-09-07
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK6 OK2026-07-03
Advisories

none known

Documentation

In release 0.2.0
READMEYes · 156 wordsVignettesYes · 1 · staticNEWSYes · 100% structured · mentions 0.2.0Citation fileNoWebsiteYes · pkgdown
Help pages
11 (1 internal)includes a package overview page
Examples that run
80%8 run in a plain check · 2 never run
Exported functions with examples
100%
Documented parameters
93%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.4K
CRAN downloads in the past year
Rank #8,316 · ~4/day · ~116/mo
Daily download trend is not available in this view yet.
38930 days
1.1K90 days
1.4K1 year
Compare downloads with other packages →
Also on42 r2u27 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
1Releases
22Commits
2Commit identities
22 commits · Last activity 2026-09-28
Responsiveness
not measured

Releases over time

2026-07-02 · 12026-07-07 · 1
PracticesBeta

9 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/strategicprojects/apifetch on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-28 · The repository has a site deploy workflow

CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-06-26
    Named in .Rbuildignore: CLAUDE.md
    Named in .gitignore: .claude, CLAUDE.md
    Commits: at least 22 crediting it in the message
Models named in its commits
  • Claude Opus 4.814 commits · Jun to Jul 2026
  • Claude Opus 5.55 commits · Sep 2026
  • Claude Fable 53 commits · Jul 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)

Installing apifetch adds 20 packages (13 with compiled code, 7.3 MB of source tarballs). Heaviest: openssl 1.1 MB, vctrs 1.0 MB, dplyr 902 KB.

Depends (1)
R >= 4.1.0
Imports (6)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Depends, Imports or LinkingTo, most downloaded first

People & History

People (6)
Author, Maintainer since 0.1.0 (2026)
Author · added in 0.2.0
Author · added in 0.2.0
Author · added in 0.2.0
Listed in earlier versions (2)
no longer listed · 0.1.0
no longer listed · 0.1.0
Releases (2)

Pick two releases to compare their code metrics.

  • 0.2.0Latest
    record
    2026-09-28 · current release · diff ↗
  • 0.1.0
    record
    2026-07-02
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-07-02
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
48 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("apifetch")
Leite, A., Amorim, C., Bezerra, D., Nascimento Barreto, J., Vasconcelos, H., & Wasiliew, M. (2026). apifetch: Token-Authenticated REST API Retrieval Toolkit (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.apifetch

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for apifetch version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy