Perforce APIs

Terms of Use

You should not download software from this page unless and until you have read our Terms of Use and agree to them in their entirety.

For additional Open Source utilities, see the Perforce Public Depot. For commercial Perforce product integrations and other third-party utilities, please see our Third-party Software Integrations page.

API Tools

Program

Description

Perforce C/C++ API
(2011.1)

The Perforce C/C++ API allows you to write your own Perforce tools in C++. It provides you with the same interface that is used by all of the Perforce client programs (P4, P4V, P4Web, and the Perforce IDE Plug-ins).

The C/C++ API User's Guide [ HTML | PDF ] is the starting point for using the API. See the release notes for the latest features.

The Perforce C/C++ API can be downloaded from the Perforce FTP site. The API is found in a tar file named p4api.tar that is located in a platform-specific directory for each release. For example, the 2011.1 version of the Perforce C/C++ API for the Linux 2.6 kernel on the x86 platform would be found here:

ftp://ftp.perforce.com/perforce/r11.1/bin.linux26x86/

 

Perforce Java API
(2011.2)

P4Java, the Perforce Java API is a Java-native API for accessing Perforce SCM services from within Java applications, servlets, plug-ins, and other Java contexts. This supported API is available for download from the Perforce FTP site. The API is found in release specific directories under 'bin.java'. For example:

ftp://ftp.perforce.com/perforce/r11.2/bin.java/p4java.zip

The distribution includes the jar files for the API and the Javadoc. See the P4Java API documentation [ HTML | PDF ] and release notes for the latest features and details.

 

Perforce Perl API
(2011.1)

P4Perl, Perforce's API for Perl allows you to write Perl scripts that directly execute Perforce commands. This supported API version is available for download from the Perforce FTP site. The APIs are found in release-specific directories.

Installers are available for Windows users in the Windows platform directory:

ftp://ftp.perforce.com/perforce/r11.1/bin.ntx86/p4perl512.exe

ftp://ftp.perforce.com/perforce/r11.1/bin.ntx64/p4perl-5.12-x64.exe

Users on other platforms must build from source. Users on Windows platforms can build from source as well. Source tarballs are found in the release-specific /bin.tools directory. For example:

ftp://ftp.perforce.com/perforce/r11.1/bin.tools/p4perl.tgz

Installation from source requires the Perforce C/C++ API listed above. See the release notes for the latest features. For additional installation and usage information, please see the APIs for Scripting manual [ HTML | PDF ].

Please note that the P4Perl API available in the Public Depot has been deprecated and is not supported.

 

Perforce Ruby API
(2011.1)

P4Ruby, Perforce's API for Ruby allows you to write Ruby scripts that directly execute Perforce commands. This supported API version is available for download from the Perforce FTP site. The APIs are found in release-specific directories.

Installers are available for Windows users in the Windows platform directory:

ftp://ftp.perforce.com/perforce/r11.1/bin.ntx86/p4ruby18.exe

Users on other platforms must build from source. Users on Windows platforms can build from source as well. Source tarballs are found in the release-specific /bin.tools directory. For example:

ftp://ftp.perforce.com/perforce/r11.1/bin.tools/p4ruby.tgz

Installation from source requires the Perforce C/C++ API listed above. See the release notes for the latest features. For additional installation and usage information, please see the APIs for Scripting manual [ HTML | PDF ].

Please note that the P4Ruby API available in the Public Depot has been deprecated and is not supported.

 

Perforce Python API
(2011.1)

P4Python, Perforce's API for Python allows you to write Python scripts that directly execute Perforce commands. This supported API version is available for download from the Perforce FTP site. The APIs are found in release-specific directories.

Installers are available for Windows users in the Windows platform directory:

ftp://ftp.perforce.com/perforce/r11.1/bin.ntx86/p4python27.exe

ftp://ftp.perforce.com/perforce/r11.1/bin.ntx64/p4python-2.7-x64.exe

Users on other platforms must build from source. Users on Windows platforms can build from source as well. Source tarballs are found in the release-specific /bin.tools directory. For example:

ftp://ftp.perforce.com/perforce/r11.1/bin.tools/p4python.tgz

Installation from source requires the Perforce C/C++ API listed above. See the release notes for the latest features. For additional installation and usage information, please see the APIs for Scripting manual
[ HTML | PDF ].

Please note that the P4Python API available in the Public Depot has been deprecated and is not supported.

 

Perforce PHP API
(2011.1)

P4PHP, Perforce's API for PHP allows you to write PHP scripts that directly execute Perforce commands. This supported API version is available for download from the Perforce FTP site. The APIs are found in release-specific directories. P4PHP must be built from source. Source tarballs are found in the release-specific /bin.tools directory. For example:

ftp://ftp.perforce.com/perforce/r11.1/bin.tools/p4php.tgz

Installation from source requires the Perforce C/C++ API listed above. See the release notes for the latest features. For additional installation and usage information, please see the APIs for Scripting manual [ HTML | PDF ].

 

Perforce Objective-C API
(2010.1)

P4ObjC, Perforce's API for Objective-C supports Objective-C developers on both the Mac and iPhone platforms. This supported API version is available for download from the Perforce FTP site site. The APIs are found in release-specific directories. Users must build from source. Source tarballs are found in the release-specific /bin.tools directory. For example:

ftp://ftp.perforce.com/perforce/r10.1/bin.tools/p4objc.tgz

Installation from source requires the Perforce C/C++ API for the target platform: macosx104u for the Mac and darwin80u for the iPhone. The source tarball includes documentation on this API. See the release notes for the latest features.

 

Unsupported Program iconP4COM, a COM Interface to the Perforce C++ API for Windows

P4COM allows you to easily execute Perforce commands from any Windows development language—there's no need to spawn p4.exe as a command line process. Examples given include VB6, VB.NET, C# and even Lisp. P4COM can also talk to internationalized Perforce servers.

Unsupported Program iconNot maintained by Perforce, but technical information is available