RecipesDocs
Coverage MatrixDocumentationChange LogLog InContact Us
Docs

Provides a download of a country flag image given a specified asset id taken from the Country Flags Manifest.

Note: Your image will not render in the Response section


Image Retrieval Example

To find the national flag for Sweden:

1: Reference the Coverage document for the proper provider. In this case, Sportradar is the provider.

2: Ensure you have the correct API key to retrieve this image. Trial keys will require a t in the access_level parameter; production keys will use a p.
3: Call the Country Flags Manifest using your Sportradar Country Flags API key, and with sr in the provider parameter.

https://api.sportradar.us/flags-images-t3/sr/country-flags/flags/manifest.xml?api_key=**your_api_key**

4: Locate the asset id and/or link for Sweden.

    <asset id="7be83df7-5970-4814-b1b0-a4dd558ab29e" created="2018-07-10T19:35:56+00:00" updated="2019-02-27T23:13:11+00:00">
        <title>
            <![CDATA[SWEDEN]]>
    
        </title>
        <description>
            <![CDATA[National Flag for SWEDEN]]>
    
        </description>
        <copyright>Sportradar AG</copyright>
        <links>
            <link width="1200" height="800" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/original.svg"/>
            <link width="250" height="167" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/h250-max-resize.png"/>
            <link width="1000" height="667" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/h1000-max-resize.png"/>
            <link width="500" height="333" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/h500-max-resize.png"/>
            <link width="3480" height="2320" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/h3480-max-resize.png"/>
            <link width="3840" height="2160" href="/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/3840x2160-crop.png"/>
        </links>
        <refs>
            <ref name="SWEDEN" type="country" sport="flags" sportradar_id="" iso_country_code="SWE" primary="true">
      </ref>
        </refs>
        <provider name="sr">
            <version>0</version>
        </provider>
    </asset>

5: Select the size of image desired within the link attribute and use this href file_name in your next call to the Country Flag Image endpoint.

https://api.sportradar.us/flags-images-t3/sr/country-flags/flags/7be83df7-5970-4814-b1b0-a4dd558ab29e/original.svg?api_key=**your_api_key**

The flag for Sweden is downloaded.

Flags are available in svg or png formats.

For pre-built requests for all of our Images collections, feel free to browse and fork our Postman workspace:

Language
Credentials
Query
Click Try It! to start a request and see the response here!