---
title: "How to retrieve usage information of HTML for Confluence"
canonical: "https://support.appfire.com/space/SUPPORT/89133629/How%20to%20retrieve%20usage%20information%20of%20HTML%20for%20Confluence"
format: markdown
---
## <span style="color: #333333">Overview</span>

<span style="color: #333333">This article explains how to retrieve the usage information like the Confluence page titles, spaces, etc. where the HTML macros are used. </span>

## <span style="color: #333333">Instructions</span>

#### <span style="color: #333333">Usage information through database query:</span>

<span style="color: #333333">Run the following query in your database:</span>

```java
SELECT c.contentid, c.contenttype, c.title, s.spacekey
FROM CONTENT c
JOIN BODYCONTENT bc
	ON c.contentid = bc.contentid
JOIN SPACES s
	ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL
	AND c.contenttype IN ('PAGE', 'BLOGPOST')
	AND bc.body LIKE '%ac:name="html"%';
```

<span style="color: #333333">If the query returns any records, it indicates that the HTML macro is being used and it displays the page title as: </span>  
  
> Macro (inline-media-image)



#### <span style="color: #333333">Usage information through SQL for Confluence:</span>

<span style="color: #333333">Alternatively, if you have the </span>[<span style="color: #333333">SQL for Confluence</span>](https://marketplace.atlassian.com/apps/225/sql-for-confluence-pro-edition?hosting=server&tab=overview)<span style="color: #333333"> app installed in your Confluence instance, you can run the mentioned query directly on the Confluence page using the SQL macro, which returns the following results: </span>

![image](media://5a371369-1187-4184-b8b2-3b6ebe20ef78)

> ⚠️ <span style="color: #333333">Test this scenario in a staging environment first before running it on a production instance.</span>



> Macro (__confluenceADFMigrationUnsupportedContentInternalExtension__)