@fastaf-co/piece-fastaf
v0.1.1
Published
FastAF web scraping, Google search, AI extraction, screenshots and structured public web data for Activepieces.
Maintainers
Readme
FastAF for Activepieces
@fastaf-co/piece-fastaf · version 0.1.0 · MIT · [email protected]
Ten Activepieces actions for public web scraping, Google search, AI extraction, screenshots and structured web data through FastAF. No triggers, automatic pagination or automatic retries are included.
Install on self-hosted Activepieces
From npm (after this version has been published)
- Sign in to your self-hosted Activepieces instance as a platform administrator.
- Open Admin → Pieces → Install from npm. Depending on the release, this is Platform Admin → Catalogue → Pieces → Install Piece, or Settings → My Pieces → Install Piece.
- Select npm as the source, enter
@fastaf-co/piece-fastaf, and select version0.1.0(or enter@fastaf-co/[email protected]if there is one field). - Enable the piece for the relevant project/piece set, then add a FastAF step to a flow and create its connection.
This checkout and its tarball are not a published npm release. An unpublished
version cannot be installed by registry name. The instance/worker must be able to
reach the npm registry to resolve this package and its runtime dependencies.
Simply running npm install beside a production server does not register a piece.
If your edition exposes Install Piece → Upload File, you can instead upload
fastaf-co-piece-fastaf-0.1.0.tgz. Private/custom piece installation can require a
paid Activepieces feature; check the capabilities of your self-hosted edition.
See public npm pieces, private pieces, and publishing custom pieces to a platform. The platform-upload CLI is different from publishing a package to npm.
Local source development with AP_DEV_PIECES
This is an Activepieces source checkout workflow, not an npm-download setting for a production Docker container:
Set up an Activepieces source checkout using its development guide.
Copy this package's
src,scripts,package.json,package-lock.json,tsconfig.json,README.mdandLICENSEintopackages/pieces/custom/fastafin that checkout. Do not copynode_modules.Register the new workspace using that checkout's package manager, then run
npm ci --ignore-scriptsandnpm run buildinside the piece folder.Add
AP_DEV_PIECES=fastafto the checkout's.env.dev, or start it from its root:AP_DEV_PIECES=fastaf npm start
The value is the folder name, not the scoped npm name or an absolute path.
The build emits dist/package.json and dist/src/index.js, the layout expected
by the current development loader. Restart/refresh your dev instance as needed.
Compatibility and dependency model
Use Node.js 24 for building; the declared Node minimum is 22.15.0. Piece
metadata retains the source's minimum Activepieces release 0.92.2 and uses
execution context V2 (context.auth.secret_text). A deployed Activepieces UI/flow
installation has not been exercised by the local Node test harness.
This is intentionally a standalone, dependency-based tsc package:
@activepieces/pieces-framework0.32.0 is a runtime dependency, not a peer or aworkspace:*placeholder. It was the latest npm-published SDK checked.@activepieces/shared0.95.1 matches that SDK's dependency and suppliesPieceCategoryandtryCatch, which that SDK does not re-export.tslib2.6.2 is a runtime dependency.pieces-commonis not used: the transport uses Node's HTTPS client with certificate verification enabled.- A small compatibility module preserves the copied actions' classifications, advanced-field flags and numeric UI hints. Older hosts may ignore these hints. All original action inputs, API mappings and outputs are retained.
Current upstream documentation uses a different packaging model: newer Activepieces workspace SDKs are bundled into each piece, rather than published individually. This package does not claim to be such a self-contained bundle. For a host requiring that model, integrate and bundle it with the matching Activepieces checkout/CLI, following the bundling guide and migration guide. Do not replace the pinned SDK with an unpublished workspace version.
The published SDK's dependency tree currently produces npm audit warnings,
including a critical advisory in transitive expr-eval. Review npm audit before
production deployment. No unverified forced downgrades or dependency overrides
are applied; a successful functional test is not a clean security audit.
Authentication
- Create a FastAF account and complete verification.
- Create an API key in the FastAF dashboard.
- Add a FastAF connection in Activepieces and paste the key into FastAF API Key.
The connection uses a secret-text field. Validation calls
GET https://api.fastaf.co/v1/usage; it does not run a paid scrape. Requests send
the key only in the Authorization: Bearer header over HTTPS to api.fastaf.co.
Never put your key in source files, flow inputs, issue reports or build logs.
The 10 actions
| Action ID | Display name | Purpose | API endpoint |
| --- | --- | --- | --- |
| scrape | Scrape Page | HTML, markdown, links, images or an AI summary of a public URL | POST /v1/scrape |
| search | Search Web | One page of Google search results | POST /v1/serp |
| extract | Extract Page Data | AI extraction using a prompt and/or field rules | POST /v1/scrape |
| screenshot | Capture Screenshot | PNG, JPG or WebP screenshot saved as an Activepieces file | POST /v1/screenshot |
| amazon | Get Amazon Data | Product search, product details, offers or bestsellers | POST /v1/amazon |
| maps | Search Maps | Google Maps places or place details | POST /v1/maps |
| linkedin | Get LinkedIn Profile | Public person-profile data | POST /v1/linkedin |
| youtube | Get YouTube Data | Video transcripts or video search | POST /v1/youtube |
| news | Search News | One page of Google News results | POST /v1/news |
| jobs | Search Jobs | One page of Google Jobs listings | POST /v1/jobs |
Scraping accepts a public URL such as https://example.com. Search requires a
query. Extract needs a prompt or nonempty rules. Amazon requires a query for
search or an ASIN for product/offers; YouTube needs a video ID for transcripts or
a query for search. LinkedIn expects the public profile slug, not a full URL.
Refer to each action's field descriptions for optional parameters and limits.
Actions consume FastAF credits. Rendering, premium proxies and AI options can increase costs; consult the FastAF documentation for current pricing. Avoid blind retries: a timeout does not prove a call was unbilled.
List actions return their primary result arrays when present. Other responses become flat records; nested object keys use underscores and nested arrays become JSON strings. Screenshots return a file reference, MIME type, bytes and credits used. HTTP errors expose a safe message and numeric status, not credentials, request configuration or response bodies.
Build and test locally
npm ci --ignore-scripts
npm run build
npm test
npm pack --dry-run
npm packnpm install can be used for the initial setup; commit the resulting
package-lock.json. The build uses a standalone tsconfig.json, emits CommonJS
and declarations to dist/src, and copies the English translation data. The
package root exports the named piece object:
const { fastaf } = require('@fastaf-co/piece-fastaf');
console.log(fastaf.displayName); // FastAF
console.log(Object.keys(fastaf.actions()).length); // 10npm test runs a load test and offline contracts for all 10 actions, input
variants, authentication, TLS, error redaction and output normalization. These do
not spend credits. To run the opt-in real authentication, scrape and search tests:
# Provision your key securely in ~/.secrets/fastaf_key; do not echo it to logs.
npm run test:liveThe live script reads the key only into memory, invokes the built actions'
run() methods with a mock Activepieces context, and uses real HTTPS (no HTTP
mocks). It reports only status/ok/credit metadata to the console and
test-results/live.json. It makes one auth request and two action calls, without
retries; scrape/search may spend credits. Do not enable this in routine CI.
Release automation
.github/workflows/publish.yml runs on a published GitHub release or a manual
dispatch, with Node 24, read-only repository access and OIDC provenance permission.
It installs from the lockfile without lifecycle scripts, builds and tests, then
publishes publicly with provenance using the repository secret NPM_TOKEN.
Publishing is intentional and separate from local build/pack/test. Set the npm
secret securely, verify repository ownership and the version, and review audit
findings before triggering a release. No publish lifecycle hook is needed: the
workflow explicitly builds before its npm publish --ignore-scripts step.
License
MIT, copyright FastAF.
