Skip to content
Getty Images API SDK - .NET
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Getty Images API SDK - .NET

build status NuGet version NuGet Open Hub


This SDK makes using the Getty Images API easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the Documentation.

  • Functionality for all endpoints.

Help & Support

Getting started

Using the Nuget Package

The SDK is published to the public Nuget package repository.

Open the package manager and add the package to your project: Add nuget package reference


The SDK supports async operations.

var client = ApiClient.GetApiClientWithClientCredentials("my_api_key", "my_api_secret");
var searchResult = await client.SearchImagesEditorial()
    .WithPhrase("all vocabulary")

foreach (var image in searchResult.images)
    Console.WriteLine("Title: {0} \r\nId: {1}", image.title,;

The SDK can also be used synchronously, such as when running in a console application:

var client = ApiClient.GetApiClientWithClientCredentials("my_api_key", "my_api_secret");
var searchResult = client.SearchImagesEditorial()
    .WithPhrase("all vocabulary")

foreach (var image in searchResult.images)
    Console.WriteLine("Title: {0} \r\nId: {1}", image.title,;

Results are returned as dynamic. Visit the API Interactive Documentation to learn more about available parameters and to see what the response objects look like.

ASP.NET Webforms

When using the SDK in a Webforms project, there are a few extra steps needed. For more detailed information, see Using Asynchronous Methods in ASP.NET 4.5 on Microsoft's documentation website.

First, the Page must be marked as Async="true":

<%@ Page Language="C#" Async="true" AutoEventWireup="true" CodeBehind="Images.aspx.cs" Inherits="WebFormsSdkTest.Images" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
            <asp:Repeater ID="RepeaterImages" runat="server">
                    <asp:Image runat="server" ImageUrl='<%#Container.DataItem%>'/>

Then register an async task in the Page_Load method:

public partial class Images : Page
    public List<string> ImageList { get; set; }
    protected void Page_Load(object sender, EventArgs e)
        RegisterAsyncTask(new PageAsyncTask(GetImages));

    private async Task GetImages()
        var client = ApiClient.GetApiClientWithClientCredentials("YOUR_API_KEY",
        var response = await client.SearchImagesCreative().WithPhrase("tacos").ExecuteAsync();
        ImageList = new List<string>();
        for (int i = 0; i < response.images.Count; i++)

        RepeaterImages.DataSource = ImageList;

Building From Source Code

This is only necessary if you would like to contribute to the project. Otherwise, use the Nuget Package


Clone the repository

Open a console window (Command Prompt, PowerShell or Bash) and issue the following commands to clone the Git repository:

git clone
cd gettyimages-api_dotnet


dotnet restore
dotnet build
dotnet test UnitTests/
You can’t perform that action at this time.