Updates the metadata for a post or video (depending on the specified
metadata-type) using the received
This endpoint uses a different
secret value from our other endpoints for security purposes. Please reach out to your account manager for details on how to identify the write-only secret value that should be used for this endpoint.
Details on providing on-page metadata can be found here.
|secret||The write-only secret value. This differs from the standard secret value use for other endpoints. Please reach out to your account manager for details on how to identify the write-only secret value that should be used for this endpoint.|
|metadata||The JSON object of metadata you would like to be written to our systems. The requisite format of this value is detailed below.|
The Metadata Parameter¶
metadata parameter should be a JSON object with the following schema:
|canonical_url||Canonical url for post or page. For page groups, like galleries, it should always point to the main page.|
|urls||Urls that should be aliased to the
|page_type||The type of page between:
|title||Page or video title.|
|image_url||Url of the image associated with the page or video.|
|pub_date_tmsp||Publication date, formatted as an ISO 8601 UTC timezone string.|
|section||Section the page is a part of. (e.g.
|authors||Author(s) of the page or video, provided as a list. (e.g.
|tags||A list of tags associated with this page or video.|
It may take some time for metadata changes to be reflected in the Parse.ly Dashboard or API results due to caching.
An example of a curl call you can execute in a command line is below.
curl -X POST https://api.parsely.com/v2/metadata/posts -d 'metadata=%7B%22pub_date_tmsp%22%3A%20%222018-11-30%22%2C%22title%22%3A%20%22Fake%20Title%22%2C%22tags%22%3A%20%5B%22Test%22%5D%2C%22authors%22%3A%20%5B%22API%20Metadata%20Endpoint%22%5D%2C%22canonical_url%22%3A%20%22https%3A%2F%2Fblog.parsely.com%2Ffake-url%22%2C%22page_type%22%3A%20%22post%22%2C%22section%22%3A%20%22Testing%22%2C%20%22full_content%22%3A%20%22Fake%20content%20for%20a%20fake%20article.%22%2C%20%22language%22%3A%20%22en%22%7D&apikey=test.com&secret=XXXXX'
This request has the following url-encoded fields and values.
The metadata JSON object has the following fields and values.
Stay on top of API updates
Want to be notified of our latest API updates? Fill out this form to get an email whenever we make changes to our API.