+1 (888) 674-2299

30,767,058 Royalty Free Stock Photos

How to use the Fotolia API

Method: getCountries

This method returns Fotolia list of countries.

Authentication

This method does not require authentification.

Arguments

Argument Type Valid Values Default Value Detail
api_key string Valid Values required you need a valid api key to use the API
language_id Int
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 11
2
  • French
  • English US
  • English UK
  • German
  • Spanish
  • Italian
  • Portuguese PT
  • Portuguese BR
  • Japanese
  • Polish

Returned Values

Element (path) Name Type Description
/[n]/ name string country name
/[n]/ id int country ID
can be used for country search using getSearchResults

Example Query


<?xml version="1.0" encoding="utf-8"?>
<methodCall>
	<methodName>xmlrpc.getCountries</methodName>
	<params>
		<param>
			<value>
				<string>YOUR_API_KEY</string>
			</value>
		</param>
		<param>
			<value>
				<int>2</int>
			</value>
		</param>
	</params>
</methodCall>

Example Response


<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>4</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Afghanistan</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>248</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Aland Islands</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>8</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Albania</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>12</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Algeria</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>16</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>American Samoa</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>20</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Andorra</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>24</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Angola</string>
                  </value>
                </member>
              </struct>
            </value>
            <value>
              <struct>
                <member>
                  <name>id</name>
                  <value>
                    <int>660</int>
                  </value>
                </member>
                <member>
                  <name>name</name>
                  <value>
                    <string>Anguilla</string>
                  </value>
                </member>
              </struct>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

Error Codes

001: Service currently unavailable
The requested service is temporarily unavailable.
002: Failed to parse request
The XML-RPC request document could not be parsed.
010: Missing API Key
The API key passed is missing.
011: Invalid API Key
The API key passed is not valid or has expired.
031: Invalid Method
This method does not exist in the method list.
032: Method not Available
This method is not available for this API Key.
2001: Invalid Language ID
The language ID passed is not valid or doesn't exist in the fotolia available language list