USA Web Children Available

The USA Web Children Available API is a RESTful API.

The service returns a random list of children that are currently available on the Compassion.com website. The children on the Compassion.com website are a subset of all the children available for sponsorship through Compassion International.

By default, the service will return 20 children but accepts a take parameter to select a specific number of children up to the maximum 100.

The children that are returned are not entirely random. They will always alternate genders and regions where we serve. Currently, Compassion defines 4 regions where we serve children: South America, Central America/Caribbean, Africa and Asia. If you request 4 children (/children?take=4), then the response will contain a child from each of our 4 regions, alternating boys and girls. A request for 8 or more will group the children in boy/girl pairs by each of the regions, continuing to alternate the regions with every other child.

If more control is needed to define criteria about the children that are returned, please use the Children Search service.

Sample Requests

These are just examples and are not intended to be comprehensive.

https://webapi.compassion.com/children?api_key=[string]
https://webapi.compassion.com/children.json?api_key=[string]
https://webapi.compassion.com/children?take=4&api_key=[string]
https://webapi.compassion.com/children.xml?take=4&api_key=[string]

Request Parameters

NameDescriptionRequiredData TypeConstraints
take Querystring Parameter. Determines the number of children to return. Optional Numeric Default: 20
Maximum: 100
api_key Querystring Parameter. Mashery-supplied key for accessing Compassion International services Yes String  

Specifying Format

By default, all requests will be returned as JSON. There are two ways to indicate an explicit format – either by using an extension on the endpoint (.json or .xml) or by setting the Accept header in the initial request (“application/json” or “application/xml”).

Sample Responses

JSON (/children.json)

[
    {
        "childKey": "BD2160220",
        "childName": "Jane Smith",
        "childPersonalName": "Jane",
        "countryName": "Bangladesh",
        "gender": "F",
        "age": 2,
        "birthDate": "2011-07-01T00:00:00",
        "waitingSinceDate": "2013-01-29T00:00:00",
        "orphan": false,
        "specialNeeds": false,
        "hivAffectedArea": false
    },
    {
        "childKey": "ME9630260",
        "childName": "John Doe",
        "childPersonalName": "John",
        "countryName": "Mexico",
        "gender": "M",
        "age": 2,
        "birthDate": "2011-07-11T00:00:00",
        "waitingSinceDate": "2012-10-31T00:00:00",
        "orphan": false,
        "specialNeeds": false,
        "hivAffectedArea": false
    },
    {
        "childKey": "ME8920367",
        "childName": "Sarah Johnson",
        "childPersonalName": "Sarah",
        "countryName": "Mexico",
        "gender": "F",
        "age": 2,
        "birthDate": "2011-02-24T00:00:00",
        "waitingSinceDate": "2013-05-08T00:00:00",
        "orphan": false,
        "specialNeeds": false,
        "hivAffectedArea": false
    },
    …
]

XML (/children.xml)

<Children>
    <Child>
        <ChildKey>ME9630260</ChildKey>
        <ChildName>John Doe</ChildName>
        <ChildPersonalName>John</ChildPersonalName>
        <CountryName>Mexico</CountryName>
        <Gender>M</Gender>
        <Age>2</Age>
        <BirthDate>2011-07-11T00:00:00</BirthDate>
        <WaitingSinceDate>2012-10-31T00:00:00</WaitingSinceDate>
        <Orphan>false</Orphan>
        <SpecialNeeds>false</SpecialNeeds>
        <HivAffectedArea>false</HivAffectedArea>
    </Child>
    <Child>
        <ChildKey>ME8920367</ChildKey>
        <ChildName>Jane Smith</ChildName>
        <ChildPersonalName>Jane</ChildPersonalName>
        <CountryName>Mexico</CountryName>
        <Gender>F</Gender>
        <Age>2</Age>
        <BirthDate>2011-02-24T00:00:00</BirthDate>
        <WaitingSinceDate>2013-05-08T00:00:00</WaitingSinceDate>
        <Orphan>false</Orphan>
        <SpecialNeeds>false</SpecialNeeds>
        <HivAffectedArea>false</HivAffectedArea>
    </Child>
    …
</Children>

Docs Navigation