• Product

  • Solutions

  • Developers

  • Docs

  • Pricing

  • Cloud

Search icon
Strapi plugin logo for Pfapi


Pfapi plugin provides fast, secure, configurable, and scalable API services for e-commerce web apps.

tests release

Strapi plugin pfapi

Pfapi plugin uses pfapi-core library to provide fast, secure, configurable, and scalable API services for e-commerce web apps.

  • Pfapi uses local and Redis caches to achieve single-digit milliseconds on average API response time.
  • IP unlimited / blocked lists, Rate limits and activities log are accessible through the admin panel.
  • API handles for detail and list views are powered by highly configurable components dynamic zone.
  • Configurable filters enable user-friendly UX for users to find what they are looking for.
  • Production environment that runs multiple Strapi servers and Redis cluster is supported and tested.


Pfapi plugin is a Strapi version 4 plugin. It requires the in-memory data store Redis. Please refer to Redis getting started to install redis server for your environment.

How to install

yarn add strapi-plugin-pfapi


npm install strapi-plugin-pfapi

Click to see full documentation

Setup Demonstration

With the world cities test data set provided by plugin strapi-plugin-pfapi-data, we can run API calls to demonstrate the idea.

step 1 install Redis server

Please refer to Redis getting started to install redis server on your local computer.

step 2 create strapi app

yarn create strapi-app strapi-pfapi-app --quickstart


npx create-strapi-app strapi-pfapi-app --quickstart

After creating and logging into your Strapi account from the browser, stop the strapi server.

step 3 install plugins

You don't have to install strapi-plugin-pfapi-data for your production.

strapi-plugin-pfapi-data provides a test data set for demo and test

cd strapi-pfapi-app

yarn add strapi-plugin-pfapi strapi-plugin-pfapi-data

yarn develop


npm install strapi-plugin-pfapi strapi-plugin-pfapi-data

npm run develop

step 4 setup api_key and permissions

get your api_key from:


Please replace Pfapi-Demo-XXXXXXXX with Pfapi-Demo for the convenience of using links posted below.

A role with name PfapiDemo is installed in the above steps.

Go to Settings > USERS & PERMISSIONS PLUGIN > Roles:

Setup PfapiDemo role


click on PfapiDemo,

Under Permissions > World-city

assign find and findOne permissions to PfapiDemo and click save.

OK, we are ready to run demos.

step 5 demos

a) tests content-type name world-cities as path variable



b) tests config handle northern-cities as path variable

handle configs are defined in PfapiHandle.




strapi api parameters


c) tests with config handle northern-city with id_field is name

config data defined in PfapiHandles for handle northern-city:


d) test data update

goto http://localhost:1337/admin/content-manager/collectionType/api::world-city.world-city/2148

make some change, for example: change the population from 288000 to 288001

check APIs:



to see if the cached data was evicted and updated

e) test config update

goto http://localhost:1337/admin/content-manager/collectionType/plugin::pfapi.pfapi-handle/1

make some changes, for example: add or remove country to the fields array

check APIs:



Install now

npm install strapi-plugin-pfapi


8 GitHub stars136 weekly downloads

Last updated

507 days ago

Strapi Version



github profile image for Sam Wen
Sam Wen

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.