api-platform 0,1,1,1,2,0 travis-ci docker Packagist phpunit

Build modern, hypermedia APIs with ease, generate React applications from the API documentation.

The API Platform Framework

Join the chat at https://gitter.im/api-platform/api-platform Build Status Build status Coverage Status SensioLabsInsight Scrutinizer Code Quality Dependency Status

The new breed of web frameworks

API Platform

The official project documentation is available on the API Platform website.

API Platform is a next-generation PHP web framework designed to easily create API-first projects without compromising extensibility and flexibility:

  • Expose in minutes an hypermedia REST API that works out of the box by reusing entity metadata (ORM mapping, validation and serialization) ; that embraces JSON-LD, Hydra and such other data formats like HAL, YAML, XML or CSV and provides a ton of features (CRUD, validation and error handling, relation embedding, filters, ordering…)
  • Enjoy the beautiful automatically generated API documentation (Swagger)
  • Use our awesome code generator to bootstrap a fully-functional data model from Schema.org vocabularies with ORM mapping and validation (you can also do it manually)
  • Easily add JSON Web Token or OAuth authentication
  • Create specs and tests with a developer friendly API context system on top of Behat
  • Develop your website UI, webapp, mobile app or anything else you want using your preferred client-side technologies! Tested and approved with React, AngularJS (integration included), Ionic and native mobile apps

API Platform embraces open web standards (Swagger, JSON-LD, Hydra, HAL, JWT, OAuth, HTTP…) and the Linked Data movement. Your API will automatically expose structured data in Schema.org/JSON-LD. It means that your API Platform application is usable out of the box with technologies of the semantic web.

It also means that your SEO will be improved because Google recommends these formats. And yes, Google crawls full-Javascript applications as well as old-fashioned ones.

Last but not least, API Platform is built on top of the Symfony full-stack framework and follows its best practices. It means than you can:

  • use thousands of Symfony bundles with API Platform
  • integrate API Platform in any existing Symfony application
  • reuse all your Symfony skills and benefit of the incredible amount of Symfony documentation
  • enjoy the popular Doctrine ORM (used by default, but fully optional: you can use the data provider you want, including but not limited to MongoDB ODM and ElasticSearch)


Read the official “Getting Started” guide.

What’s inside?

API Platform provides rock solid foundations to build your project:

  • The Schema Generator to generate PHP entities from Schema.org types with Doctrine ORM mappings, Symfony validation and extended PHPDoc
  • The API Platform Core Library to expose in minutes your entities as a JSON-LD and Hydra enabled hypermedia REST API
  • Swagger UI integrated with the API bundle to automatically generate a beautiful human-readable documentation and a sandbox to test the API
  • Behat and Behatch configured to easily test the API
  • The full power of the Symfony framework and its ecosystem
  • Doctrine ORM/DBAL
  • An AppBundle you can use to start coding
  • Annotations enabled for everything
  • Swiftmailer and Twig to create beautiful emails

It comes pre-configured with the following bundles:

  • Symfony - API Platform is built on top of the full-stack Symfony framework
  • API Platform’s API bundle - Creates powerful Hypermedia APIs supporting JSON-LD and Hydra
  • DunglasActionBundle - Automatically register actions, commands and event subscribers as a service
  • NelmioCorsBundle - Support for CORS headers
  • NelmioApiDocBundle - Generates a human-readable documentation
  • FosHttpCacheBundle - Add powerful caching capacities, supports Varnish, Nginx a built-in PHP reverse proxy
  • SensioFrameworkExtraBundle - Adds several enhancements, including template and routing annotation capability
  • DoctrineBundle - Adds support for the Doctrine ORM
  • TwigBundle - Adds support for the Twig templating engine (useful in emails)
  • SecurityBundle - Authentication and roles by integrating Symfony’s security component
  • SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails
  • MonologBundle - Adds support for Monolog, a logging library
  • WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar
  • SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions
  • SensioGeneratorBundle (in dev/test env) - Adds code generation capabilities

All libraries and bundles included in API Platform are released under the MIT or BSD license.

Authentication support

Json Web Token is a lightweight and popular way to handle authentication in a stateless way. Install LexikJWTAuthenticationBundle to adds JWT support to API Platform.

Oauth support can also be easily added using FOSOAuthServerBundle.



Created by Kévin Dunglas. Sponsored by Les-Tilleuls.coop Commercial support available upon request.

Related Repositories



HTTP API design guide extracted from work on the Heroku Platform API ...



Build modern, hypermedia APIs with ease, generate React applications from the API documentation. ...



Working samples for the Apigee API Platform ...



根据 Heroku Platform API 的设计经验总结而来的 HTTP API 设计指南 ...



HTTP API design guide extracted from work on the Heroku Platform API ...

Top Contributors

dunglas theofidry teohhanhui sroze amenophis toofff blazarecki aitboudad Quentin80 gitter-badger tpluscode vincentchalamon n1c01a5 azzra


package version
php >=7.0
api-platform/core ^[email protected]
doctrine/doctrine-bundle ^1.6
doctrine/orm ^2.5
guzzlehttp/guzzle ^6.0
incenteev/composer-parameter-handler ^2.0
nelmio/cors-bundle ^1.4
phpdocumentor/reflection-docblock ^3.0
sensio/distribution-bundle ^5.0.19
sensio/framework-extra-bundle ^3.0.2
symfony/monolog-bundle ^3.1.0
symfony/swiftmailer-bundle ^2.3.10
symfony/symfony 3.3.*
twig/twig ^1.0 || ^2.0
dev api-platform/schema-generator ^1.2
behat/behat ^3.1
behat/mink ^1.7
behat/mink-browserkit-driver ^1.3.1
behat/mink-extension ^2.2
behat/symfony2-extension ^2.1
behatch/contexts ^2.5
sensio/generator-bundle ^3.0
symfony/phpunit-bridge ^3.0


-   v2.0.0-rc.1 zip tar
-   v2.0.0-beta.2 zip tar
-   v2.0.0-beta.1 zip tar
-   v2.0.0-alpha.2 zip tar
-   v2.0.0-alpha.1 zip tar
-   v1.1.0-beta.1 zip tar
-   v1.0.0 zip tar
-   v1.0.0-beta.2 zip tar
-   v1.0.0-beta zip tar