API Flows

All methods under the flow namespace accepts the following parameters:

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.

Available Calls

/list

Returns a list of flows.

/stats

Returns aggregation stat objects for all flow types.

/years

Returns flow data aggregated by year.

/origin

Returns flow data aggregated by origin.

/destination

Returns flow data aggregated by destination.

/sector/3

Returns flow data aggregated by sector 3 codes.

 

flows/list

Returns a list of flows.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

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

{
  count: 462793,
  hits: [
    {
      constant_value: 2381140017.016298,
      currencyYear: 2004,
      currency_id: 2,
      current_value: 1906250000,
      flow_type: {
        _id: 142251320,
        isPureAggregateFlowType: true,
        name: "FDI Outflows"
      },
      importFileId: 142353979,
      origin: {
        _id: 40188476,
        iso2: "PA",
        metadata: "donors",
        name: "Panama"
      },
      value: 1906250000,
      year: 2004
    }
  ]
}

flows/stats

Returns aggregation stat objects for all flow types.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

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

{
  item_count: 5,
  items: [
    {
      total: 29196955259872.855,
      max: 420453244756.14233,
      min: -54132396606.19682,
      avg: 5598649138.997671,
      source: {
        _id: 142251320,
        isPureAggregateFlowType: true,
        name: "FDI Outflows"
      }
    }
  ]
}

flows/years

Returns flow data aggregated by year.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

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

{
  item_count: 67,
  items: [
    {
      total: 5602424798648.701,
      max: 420453244756.14233,
      min: -31091622390.92942,
      avg: 213311940.24705684,
      source: 2007
    }
  ]
}

flows/origin

Returns flow data aggregated by origin.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

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

{
  item_count: 277,
  items: [
    {
      total: 6368430673331.2295,
      max: 420453244756.14233,
      min: 1992756027.8589993,
      avg: 74051519457.33987,
      source: {
        _id: 52,
        iso2: "US",
        metadata: "donors",
        name: "United States",
        parentAgency: 110593551
      }
    }
  ]
}

flows/destination

Returns flow data aggregated by destination.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

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

{
  item_count: 238,
  items: [
    {
      total: 5146372971585.201,
      max: 489775486150.9944,
      min: 0,
      avg: 32571980832.81773,
      source: {
        _id: 110593598,
        iso2: "US",
        metadata: "recipient",
        name: "United States",
        parentAgency: 110593551
      }
    }
  ]
}

flows/sector/3

Returns flow data aggregated by sector 3 codes.

Parameters
  from [optional] : number to start returning results from.
  size [optional]: max number of results to return.

Example

http://api.aiddata.org/flows/sector/3

{
  item_count: 44,
  items: [
    {
      total: 919662940335.265,
      max: 55506709892.61519,
      min: -39722.77537712794,
      avg: 130024450.77552171,
      source: {
        _id: 204,
        name: "GENERAL BUDGET SUPPORT",
        code: "510"
      },
      term: "510"
    }
  ]
}