cURL Example

cURL is a command line tool for transferring files with URL syntax and can be download here. It can be used in conjunction with other programming languages, like PHP, or run by itself using the command line. All of the documented API methods contain an example of how to access the operation using cURL.

The example below sets the Accept header to application/xml, therefore, the response is returned in the XML format.

Sample Request

The following code calls the Get All Projects Ids API operation that retrieves all the available project ids.

curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "https://api.globalgiving.org/api/public/projectservice/all/projects/ids?api_key=YOUR_API_KEY"

Sample Response

<projects>
   <project>
      <id>3</id>
   </project>
   <project>
      <id>18</id>
   </project>
   <project>
      <id>4</id>
   </project>
   <project>
      <id>6</id>
   </project>
   <project>......</project>
</projects>
WARNING: Javascript is currently disabled or is not available in your browser. GlobalGiving makes extensive use of Javascript and will not function properly with Javascript disabled. Please enable Javascript and refresh this page.