This version has been deprecated and will soon automatically redirect to the new docs.

Imgur API Version 3 Updated April 8, 2016

API Status Status for the API can be found at status.imgur.com!

Overview Imgur's API exposes the entire Imgur infrastructure via a standardized programmatic interface. Using Imgur's API, you can do just about anything you can do on imgur.com, while using your programming language of choice. The Imgur API is a RESTful API based on HTTP requests and XML or JSON(P) responses. If you're familiar with the APIs of Twitter, Amazon's S3, del.icio.us, or a host of other web services, you'll feel right at home. This version of the API, version 3, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via SSL/TLS to https://. It also means that you need to register your application, even if you aren't allowing users to login.

Need help? The Imgur engineers are always around answering questions. The quickest way to get help is by posting your question on StackOverflow with the Imgur tag.

Register an Application (IMPORTANT) Each client must register their application and receive the client_id and client_secret. For public read-only and anonymous resources, such as getting image info, looking up user comments, etc. all you need to do is send an authorization header with your client_id in your requests. This also works if you'd like to upload images anonymously (without the image being tied to an account), or if you'd like to create an anonymous album. This lets us know which application is accessing the API. Authorization: Client-ID YOUR_CLIENT_ID

Commercial Usage Your application is commercial if you're making any money with it (which includes in-app advertising), if you plan on making any money with it, or if it belongs to a commercial organization. To use Imgur's API commercially, you must first register your application. Once that's done, you must register with RapidAPI. RapidAPI allows you to choose a pricing plan that fits your needs. From then on, the API endpoint is https://imgur-apiv3.p.rapidapi.com/ which must be used in replace of https://api.imgur.com/. Additionally, you must set a X-Mashape-Key request header with the key obtained from Mashape.

Free Usage The Imgur API is free for non-commercial usage. Your application is probably free if you don't plan on making any money with it, or if it's open source.

Endpoints The API is accessed by making HTTP requests to a specific version endpoint URL, in which GET or POST variables contain information about what you wish to access. Every endpoint is accessed via an SSL-enabled HTTPS (port 443), this is because everything is using OAuth 2.0. Everything (methods, parameters, etc.) is fixed to a version number, and every call must contain one. Different Versions are available at different endpoint URLs. The latest version is Version 3. The stable HTTP endpoint for the latest version is: https://api.imgur.com/3/ The previous versions can still be accessed if you use the API version number at the end of the default endpoint. However, these previous versions are no longer supported, so if you find a bug, we're going to ask that you move to the latest version.

Responses Each response is wrapped in a data tag. This means if you have a response, it will always be within the data field. We also include a status code and success flag in the response. For more information and examples go to the data models page. Responses are either JSON (the default), JSONP, or XML. Response formats are specified by supplying an extension to the API call. For example, if you want to access the gallery information with JSON: https://api.imgur.com/3/gallery.json JSONP responses are made by adding the callback parameter via either GET or POST to the request. For example: https://api.imgur.com/3/gallery.json?callback=function_name and to specify an XML response, the URL is: https://api.imgur.com/3/gallery.xml

Paging Results For the most part, if the API action is plural, you can page it via a query string parameter.



NOTE: /gallery endpoints do not support the perPage query string, and /album/{id}/images is not paged. Query String Parameter Required Description page optional Page number of the result set (default: 0) perPage optional Limit the number of results per page. (default: 50, max: 100) Example: https://api.imgur.com/3/account/imgur/images/0.json?perPage=42&page=6

Authentication The API requires each client to use OAuth 2 authentication. This means you'll have to register your application, and generate an access_code if you'd like to log in as a user. For public read-only and anonymous resources, such as getting image info, looking up user comments, etc. all you need to do is send an authorization header with your client_id in your requests. This also works if you'd like to upload images anonymously (without the image being tied to an account), or if you'd like to create an anonymous album. This lets us know which application is accessing the API. Authorization: Client-ID YOUR_CLIENT_ID For accessing a user's account, please visit the OAuth2 section of the docs.

OAuth Endpoints To access OAuth, the following endpoints must be used: https://api.imgur.com/oauth2/addclient

https://api.imgur.com/oauth2/authorize

https://api.imgur.com/oauth2/token You can also verify your OAuth 2.0 tokens by setting your header and visiting the page https://api.imgur.com/oauth2/secret