> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.zignallabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.zignallabs.com/_mcp/server.

# Stories & Metadata v4

POST https://api.zignallabs.com/newsroom/v4/profiles/{id}/stories
Content-Type: application/json

**Deprecated:** Use [Stories & Metadata v5](#/Newsroom/getStoriesV5) instead.

Allows the retrieval of individual stories with meta-data for a specific Dataset, time range, optional source parameter, sort order and Smart Filter id provided in request. Each response is limited to 200 stories at a time. A 'next' token will be provided in the response that can be used to retrieve the next page of stories for the timeframe. The response will contain the field `potential_impressions` if any impressions exist for the story, otherwise this field will be considered unknown and not included in the response.

- The date range has to be 32 days or less.
- By default time is in UTC 'Z'. It can be modified replacing 'Z' with time offsets that can go from '+12:00' to '-12:00': `YYYY-MM-DDTHH:MM:SS±HH:MM`.
- Date values are optional. Default to the last 24 hours when not specified.
- Pagination: For a given date (timestamp) range, the 'total' field indicates the number of stories that fit the request. Of those results, 0 to 200 will be returned in the response. If the total exceeds the 200 limit, a 'next' token will be returned allowing the user to get the next block of results.
- `next` is the token to retrieve the next page (if total results for request > 200).
- `sorted_by` allows results to be retrieved in the order they were created (default) or in the order they were persisted in the Zignal platform. Possible values: `persisted_at` and `created_at`. If `persisted_at` is provided, only the last 2 days can be queried.


Reference: https://docs.zignallabs.com/api-reference/data-api-newsroom/newsroom/get-stories-v-4

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: zignal-data-api-newsroom
  version: 1.0.0
paths:
  /newsroom/v4/profiles/{id}/stories:
    post:
      operationId: getStoriesV4
      summary: Stories & Metadata v4
      description: >
        **Deprecated:** Use [Stories & Metadata v5](#/Newsroom/getStoriesV5)
        instead.


        Allows the retrieval of individual stories with meta-data for a specific
        Dataset, time range, optional source parameter, sort order and Smart
        Filter id provided in request. Each response is limited to 200 stories
        at a time. A 'next' token will be provided in the response that can be
        used to retrieve the next page of stories for the timeframe. The
        response will contain the field `potential_impressions` if any
        impressions exist for the story, otherwise this field will be considered
        unknown and not included in the response.


        - The date range has to be 32 days or less.

        - By default time is in UTC 'Z'. It can be modified replacing 'Z' with
        time offsets that can go from '+12:00' to '-12:00':
        `YYYY-MM-DDTHH:MM:SS±HH:MM`.

        - Date values are optional. Default to the last 24 hours when not
        specified.

        - Pagination: For a given date (timestamp) range, the 'total' field
        indicates the number of stories that fit the request. Of those results,
        0 to 200 will be returned in the response. If the total exceeds the 200
        limit, a 'next' token will be returned allowing the user to get the next
        block of results.

        - `next` is the token to retrieve the next page (if total results for
        request > 200).

        - `sorted_by` allows results to be retrieved in the order they were
        created (default) or in the order they were persisted in the Zignal
        platform. Possible values: `persisted_at` and `created_at`. If
        `persisted_at` is provided, only the last 2 days can be queried.
      tags:
        - newsroom
      parameters:
        - name: id
          in: path
          description: The Dataset id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                description: Any type
        '400':
          description: |
            Returned when the request contains invalid parameters:
            - `gte` is not a valid date
            - `gte` is more than 32 days in the past
            - `gte` is after `lt`
            - `lt` is not a valid date
            - `lt` is in the future
            - The date range is greater than 24 hours
            - `order` string is not 'asc' or 'desc'
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: |
            Returned when a referenced resource cannot be found:
            - The Dataset id cannot be found
            - The `smartFilterId` cannot be found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                description: Any type
servers:
  - url: https://api.zignallabs.com
    description: https://api.zignallabs.com

```

## Examples



**Request**

```json
{
  "gte": "2026-05-11T00:00:00Z",
  "link": "https://example.com/article",
  "lt": "2026-05-18T00:00:00Z",
  "next": "eyJzZWFyY2hfYWZ0ZXIiOls...",
  "order": "desc",
  "smartFilterId": "abc123",
  "sorted_by": "created_at",
  "source": "news"
}
```

**SDK Code**

```python Newsroom_getStoriesV4_example
import requests

url = "https://api.zignallabs.com/newsroom/v4/profiles/id/stories"

payload = {
    "gte": "2026-05-11T00:00:00Z",
    "link": "https://example.com/article",
    "lt": "2026-05-18T00:00:00Z",
    "next": "eyJzZWFyY2hfYWZ0ZXIiOls...",
    "order": "desc",
    "smartFilterId": "abc123",
    "sorted_by": "created_at",
    "source": "news"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Newsroom_getStoriesV4_example
const url = 'https://api.zignallabs.com/newsroom/v4/profiles/id/stories';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"gte":"2026-05-11T00:00:00Z","link":"https://example.com/article","lt":"2026-05-18T00:00:00Z","next":"eyJzZWFyY2hfYWZ0ZXIiOls...","order":"desc","smartFilterId":"abc123","sorted_by":"created_at","source":"news"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Newsroom_getStoriesV4_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.zignallabs.com/newsroom/v4/profiles/id/stories"

	payload := strings.NewReader("{\n  \"gte\": \"2026-05-11T00:00:00Z\",\n  \"link\": \"https://example.com/article\",\n  \"lt\": \"2026-05-18T00:00:00Z\",\n  \"next\": \"eyJzZWFyY2hfYWZ0ZXIiOls...\",\n  \"order\": \"desc\",\n  \"smartFilterId\": \"abc123\",\n  \"sorted_by\": \"created_at\",\n  \"source\": \"news\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Newsroom_getStoriesV4_example
require 'uri'
require 'net/http'

url = URI("https://api.zignallabs.com/newsroom/v4/profiles/id/stories")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"gte\": \"2026-05-11T00:00:00Z\",\n  \"link\": \"https://example.com/article\",\n  \"lt\": \"2026-05-18T00:00:00Z\",\n  \"next\": \"eyJzZWFyY2hfYWZ0ZXIiOls...\",\n  \"order\": \"desc\",\n  \"smartFilterId\": \"abc123\",\n  \"sorted_by\": \"created_at\",\n  \"source\": \"news\"\n}"

response = http.request(request)
puts response.read_body
```

```java Newsroom_getStoriesV4_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.zignallabs.com/newsroom/v4/profiles/id/stories")
  .header("Content-Type", "application/json")
  .body("{\n  \"gte\": \"2026-05-11T00:00:00Z\",\n  \"link\": \"https://example.com/article\",\n  \"lt\": \"2026-05-18T00:00:00Z\",\n  \"next\": \"eyJzZWFyY2hfYWZ0ZXIiOls...\",\n  \"order\": \"desc\",\n  \"smartFilterId\": \"abc123\",\n  \"sorted_by\": \"created_at\",\n  \"source\": \"news\"\n}")
  .asString();
```

```php Newsroom_getStoriesV4_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.zignallabs.com/newsroom/v4/profiles/id/stories', [
  'body' => '{
  "gte": "2026-05-11T00:00:00Z",
  "link": "https://example.com/article",
  "lt": "2026-05-18T00:00:00Z",
  "next": "eyJzZWFyY2hfYWZ0ZXIiOls...",
  "order": "desc",
  "smartFilterId": "abc123",
  "sorted_by": "created_at",
  "source": "news"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Newsroom_getStoriesV4_example
using RestSharp;

var client = new RestClient("https://api.zignallabs.com/newsroom/v4/profiles/id/stories");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"gte\": \"2026-05-11T00:00:00Z\",\n  \"link\": \"https://example.com/article\",\n  \"lt\": \"2026-05-18T00:00:00Z\",\n  \"next\": \"eyJzZWFyY2hfYWZ0ZXIiOls...\",\n  \"order\": \"desc\",\n  \"smartFilterId\": \"abc123\",\n  \"sorted_by\": \"created_at\",\n  \"source\": \"news\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Newsroom_getStoriesV4_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "gte": "2026-05-11T00:00:00Z",
  "link": "https://example.com/article",
  "lt": "2026-05-18T00:00:00Z",
  "next": "eyJzZWFyY2hfYWZ0ZXIiOls...",
  "order": "desc",
  "smartFilterId": "abc123",
  "sorted_by": "created_at",
  "source": "news"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.zignallabs.com/newsroom/v4/profiles/id/stories")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```