> ## Documentation Index
> Fetch the complete documentation index at: https://api.globalwebindex.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 3: Retrieve an insight

> Generate insights for up to ten prompts in one request

Pass one short prompt per topic in `prompts` (1–10), the audience IDs in `enforced_audiences` (up to 10), and the codes from [Step 2](https://api.globalwebindex.com/docs/spark-api/v2/getting-started/structuring-query.md). Do not repeat the audience in the prompt text: `enforced_audiences` already sets it.

```bash Request theme={null}
curl -X POST "https://api.globalwebindex.com/v2/spark-api/insights/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompts": ["electric car ownership"],
    "enforced_audiences": ["00000000-0000-4000-8000-000000000001"],
    "location_codes": ["s2_44"],
    "wave_codes": ["q1_2025"]
  }'
```

```json Response theme={null}
{
  "results": [
    {
      "state_id": "00000000-0000-4000-8000-000000000010",
      "prompt": "electric car ownership",
      "message": "Based on the prompt electric car ownership, the Insights tool generated the following insights:",
      "has_more_insights": true,
      "inaccessible_locations": [],
      "insights": [
        {
          "id": "00000000-0000-4000-8000-000000000101",
          "text": "20% of Gen Z car owners and future purchasers say an electric vehicle enhances their style and status, making them 150% more likely to cite this advantage than the average car owner or future purchaser.",
          "is_simulated": false
        },
        {
          "id": "00000000-0000-4000-8000-000000000102",
          "text": "10% of Gen Z car owners and future purchasers value an electric vehicle’s efficient use of space, making them 100% more likely to cite it than the average car owner or future purchaser.",
          "is_simulated": false
        },
        {
          "id": "00000000-0000-4000-8000-000000000103",
          "text": "15% of Gen Z car owners and future purchasers cite performance and handling as an electric vehicle’s main advantage, making them 50% more likely to do so than the average car owner or future purchaser.",
          "is_simulated": false
        }
      ],
      "origins": {
        "audiences": [
          {
            "description": "This audience consists of individuals who are part of Gen Z.",
            "id": "00000000-0000-4000-8000-000000000001",
            "is_simulated": false,
            "name": "Generation: Gen Z"
          }
        ],
        "datasets": [
          {
            "code": "ds-core",
            "is_simulated": false,
            "name": "GWI Core"
          },
          {
            "code": "ds-gwi-automotive",
            "is_simulated": false,
            "name": "GWI Automotive"
          }
        ],
        "locations": [
          {
            "code": "s2_44",
            "name": "UK"
          }
        ],
        "topics": [
          "electric car ownership"
        ],
        "uses_simulated_data": false,
        "waves": [
          {
            "code": "q1_2025",
            "name": "Q1 2025"
          }
        ]
      }
    }
  ]
}
```

`results` has one entry per prompt, in the order you sent them. A prompt that fails carries `error` and `message` on its own result, and the other prompts still return their insights. An empty `insights` array with no `error` is a valid result; read `message` for context. `insights[].url` is included when your account has access to insight links on the GWI platform. Use `limit` (1–20) to set the maximum number of insights per prompt.

`is_simulated` on each insight, audience and dataset is `true` when it is based on simulated data. `origins.uses_simulated_data` is `true` when any of the sources behind a result is simulated.

`origins` describes the provenance of each result: the `topics`, `audiences`, `datasets`, `locations` and `waves` used to generate it. To link an insight to the GWI platform, use `insights[].url`, not `origins`.

To ask a follow-up question for the same audience, or to get the statistics behind an insight, see [Step 4](https://api.globalwebindex.com/docs/spark-api/v2/getting-started/follow-up.md).
