---
title: "getBlog"
canonical: "https://support.appfire.com/space/PSCONF/15304695/getBlog"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getBlog(spaceKey, title, postingDate) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Retrieves a blog ID by searching for space key, blog title and posting date.

Retrieves a blog ID by searching for space key, blog title and posting date. The routine will return a -1 if the blog is not found.

## Return Type

**Number**

## Examples

### Example 1

Print Return 323827648

```javascript
number blog = getBlog("PSCONF", "Some Blog", "2010-01-20");
print("Return " + blog);
```

Print Return 323827648

### Example 2

Print Return -1

```javascript
number page = getBlog("PSCONF", "Non-ExistantBlog", "2010-01-20");
print("Return " + blog);
```

Print Return -1

## See also

> Macro (contentbylabel)