Skip to main content

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.

Try it in your browser.

/downloads_csv

Returns a list of assets with just their downloads as a CSV file.

Try it in your browser.

Parameters

About Parameters

By default all functions 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 functions 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
  • List of Tags, separated by commas
method

Method used to create the asset.


See Asset Types & Creation Methods for details on what these values mean.



PBRApproximated
PBRPhotogrammetry
PBRProcedural
PBRMultiAngle
PlainPhoto
3DPhotogrammetry
HDRIStitched
HDRIStitchedEdited
PlainPhoto
UnknownOrOther
  • Multiple values can be concatenated using a comma which will be interpreted as a logical OR.
  • Not setting the parameter or sending an empty string will disable the filter.
  • Any other value will lead to 0 results.
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.

3DModel
Atlas
Brush
Decal
HDRI
Material
PlainTexture
Substance
Terrain
  • Multiple values can be concatenated using a comma which will be interpreted as a logical OR.
  • Not setting the parameter or sending an empty string will disable the filter.
  • Any other value will lead to 0 results.
sort Defines the order of the results.
Latest
Popular
Alphabet
Downloads
  • Not setting the parameter, sending an empty string or sending any other value will be interpreted as “Latest”.
id If set to a non-empty string it only matches the one specific AssetID.
PavingStones036
RockSubstance003
3DPear003
...
  • Multiple values can be concatenated using a comma.
  • Non-existent assetIds will be ignored (the other ids will still be returned)
date

Returns all assets for one specific release date.


  • Date string formatted “YYYY-MM-DD” 
  • Values that don’t fit this standard will lead to 0 results.
limit

Defines the maximum number of results to be shown.

  • Positive integer
  • The CSV output can be set to show all results by not setting the limit.
  • The JSON output is limited to up to 100 assets per request.
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.

  • Integer >= 0
include

(only available in /full_json)

The include-parameter can be used to control what data should be returned by the JSON-API. 



statisticsData
tagData
displayData
dimensionsData
relationshipData
neighbourData
downloadData
previewData
mapData
usdData
imageData
  • Multiple values can be concatenated using a comma.