API Docs (v2)
Calling the API
The API can be called by sending GET-Requests to one of two endpoints
https://ambientCG.com/api/v2/<endpoint + GET-parameters>
Both endpoints return two kinds of links for downloading files:
downloadLink (recommended) will log the download into the website statistics and then perform an HTTP redirect to the rawLink which contains the direct link to the file.
If your implementation struggles with this kind of redirect you can use the rawLink, otherwise the use of the downloadLink is encouraged to generate more accurate download statistics.
/full_json
Returns a list of assets with their metadata, links to preview images and downloads as a JSON string. Not all data is returned by default, use the 'include' parameter explained in the table below.
/categories_json
Returns a list of the asset categories.
/downloads_csv
Returns a list of assets with just their downloads as a CSV file.
Parameters for full_json and downloads_csv
About Parameters
By default all asset endpoints return a full list featuring all assets that ambientCG has to offer. The output of both endpoints can be limited/filtered using the GET-parameters listed below.
All asset endpoints support the same syntax as the list page of ambientCG (ambientCG.com/list) meaning that all GET-parameters can be copied from the /list page. For Example: Searching for the most popular photoscanned PBR materials is done using the same parameters on the /list page and the API.
https://ambientcg.com/list?method=PBRPhotogrammetry&type=Material&sort=Popular
https://ambientCG.com/api/v2/full_json?method=PBRPhotogrammetry&type=Material&sort=Popular
List of parameters
Parameter |
Description | Allowed values |
q | Search query |
|
method |
Method used to create the asset. See Asset Types & Creation Methods for details on what these values mean. |
|
type |
Defines the data type of the assets, for example PBR materials, Substance files or 3D models. See Asset Types & Creation Methods for details on what these values mean. |
|
sort | Defines the order of the results. |
|
id | If set to a non-empty string it only matches the one specific AssetID. |
|
date |
Returns all assets for one specific release date. |
|
limit |
Defines the maximum number of results to be shown. |
|
offset |
Defines the offset in the results. Setting it to 0 or not setting it at all returns the results starting with the first one. Setting it to a positive number causes this number of assets to be skipped. The offset will only take effect if a limit (see above) has been set. |
|
include |
(only available in /full_json) The include-parameter can be used to control what data should be returned by the JSON-API. |
|