API Data

Provides data such as sector codes, recipients, and donors to be used as parameters in other namespaces.

Parameters

    from [optional] <Numeric>: position to start returning results from. (Note: not the id to start from, but the position in the array of results.)

    size [optional]<Numeric>: max number of results to return. 50 is the max.

Available Methods

/origin/:type

Returns an array of origins of aid.

/destination/:type

Returns an array of destinations of aid

/receivers

Returns an array of places that receive aid.

/sectors/:sector

Returns an array of sectors.

/years

Returns an array of valid years and their ids, which tend to be a direct mapping ie. id:1996, year:1996.

/flows

Returns an array of flows and their id.

 

Data

 

data/origin/:type

Returns an array of origins of aid.

Parameters
:type -
  groups: A larger collection of orgs ex. North & Central America
  organizations: A country or organization ex. Argentina
  providers: An aid organization ex. African Development Fund (AFDF)

Example

http://api.aiddata.org/data/origin/groups

{ 
  count: 10,   // The number of results
  hits: [      // Array of results of :type, trimmed to 'size' param
    {
      id: 110593473,
      name: "Far East Asia",
      iso3: null,
      iso2: null,
      oecdCode: null,
      type_id: 3250263,
      type_name: "UNKNOWN"
    },
    ...
  ]
}  

 


data/destination/:type

Returns an array of destinations of aid.

Parameters
:type -
  groups: A larger collection of orgs ex. North & Central America
  organizations: A country or organization ex. Argentina

Example

http://api.aiddata.org/data/destination/groups

{ 
  count: 11,   // The number of results
  hits: [      // Array of results, trimmed to 'size' param
    {
      id: 110593456,
      name: "Arab Countries, Regional Programs",
      iso3: "",
      iso2: "",
      oecdCode: null,
      type_id: 3250263,
      type_name: "UNKNOWN"
    },
    //...
  ]
}  

data/sectors/:sector

Returns an array of sectors.

Parameters
:sector -
  3: Sector codes 3 digits long, highest level
  5: Sector codes 5 digits long, mid level
  7: Sector codes 7 digits long, most granular level

Example

http://api.aiddata.org/data/sectors/3

{ 
  count: 44,   // The number of results
  hits: [      // Array of sectors, trimmed to 'size' param
    {
      id: 111,
      code: "240", // Sector code
      name: "BANKING AND FINANCIAL SERVICES"
    },
    ...
  ]
}  

data/receivers

Returns an array of places that receive aid.

Example

http://api.aiddata.org/data/receivers

{ 
  count: 44,   // The number of results
  hits: [      // Array of receivers, trimmed to 'size' param
     {
       id: 110593591,
       name: "United Nations Development Programme (UNDP)",
       iso3: "",
       iso2: "",
       oecdCode: null,
       type_id: null,
       type_name: null,
       parent_agency_id: 110593590
     },
    ...
  ]
}  

data/years

Returns an array of valid years and their ids, which tend to be a direct mapping ie. id:1996, year:1996.

Example

http://api.aiddata.org/data/years

{ 
  count: 44,   // The number of results
  hits: [      // Array of sectors, trimmed to 'size' param
    {
      name: 1947,
      id: 1947
    },
    ...
  ]
}  

data/flows

Returns an array of flows.

Example

http://api.aiddata.org/data/flows

{ 
  count: 5,   // The number of results
  hits: [      // Array of flows, trimmed to 'size' param
    {id:142251319, name:"FDI Inflows"},
    {id:142251320, name:"FDI Outflows"},
    {id:0,         name:"International Aid"},
    {id:142251317, name:"Remittance Inflows"},
    {id:142251318, name:"Remittance Outflows"}
  ]
}