For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Data API
    • Introduction
  • Token
    • GETGet Authorization User Info
    • GETGet Authorization Info
  • Sites
    • GETList Sites
    • GETGet Site
    • GETGet Custom Domains
    • POSTPublish Site
  • Pages and Components
  • CMS
  • Forms
  • Custom Code
      • GETGet Custom Code
      • PUTAdd/Update Custom Code
      • DELDelete Custom Code
  • Assets
  • Comments
    • GETList Comment Threads
    • GETGet Comment Thread
    • GETList Comment Replies
  • Ecommerce
  • Webhooks
    • GETList Webhooks
    • GETGet Webhook
    • POSTCreate Webhook
    • DELRemove Webhook
  • Site Configuration
  • Enterprise
LogoLogo
Resources
Get started
Custom CodeCustom Code - Pages

Get Custom Code

GET
https://api.webflow.com/v2/pages/:page_id/custom_code
GET
/v2/pages/:page_id/custom_code
$curl https://api.webflow.com/v2/pages/63c720f9347c2139b248e552/custom_code \
> -H "Authorization: Bearer <token>"
1{
2 "value": {
3 "scripts": [
4 {
5 "id": "cms_slider",
6 "location": "header",
7 "version": "1.0.0",
8 "attributes": {
9 "my-attribute": "some-value"
10 }
11 },
12 {
13 "id": "alert",
14 "location": "header",
15 "version": "0.0.1",
16 "attributes": {}
17 }
18 ],
19 "lastUpdated": "2022-10-26T00:28:54.191Z",
20 "createdOn": "2022-10-26T00:28:54.191Z"
21 }
22}
Get all scripts applied to a page. <Note>Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).</Note> Required scope | `custom_code:read`
Was this page helpful?
Previous

Add/Update Custom Code

Next
Built with

Get all scripts applied to a page.

Access to this endpoint requires a bearer token obtained from an OAuth Code Grant Flow.

Required scope | custom_code:read

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

page_idstringRequiredformat: "objectid"
Unique identifier for a Page

Response

Request was successful
scriptslist of objects
A list of scripts applied to a Site or a Page
lastUpdatedstringRead-onlyformat: "date-string"
Date when the Site's scripts were last updated
createdOnstringRead-onlyformat: "date-string"
Date when the Site's scripts were created

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error