Skip to main content
Linkup’s structured output feature allows you to receive responses in a custom format that you define. This is particularly useful when you need to integrate Linkup’s responses directly into your application’s data structure or when you want to ensure consistency in the response format.

How it works

To use structured outputs:
  1. Set outputType to "structured" in your API request
  2. Provide a JSON schema string in the structuredOutputSchema parameter
  3. The API will return a response that strictly follows your schema
Write your query so that its answer contains the information requested in the structuredOutputSchema — the system will use the query response to fill the output.

Basic examples

Let’s look at some simple examples that demonstrate how to use structured outputs for different use cases:

This example extracts company classification information:

Example response:

This example shows how to retrieve basic information about a movie:

Example response:

This example retrieves weather information for travel planning:

Example response:

Advanced example: competitive analysis

This example shows how to extract structured competitive analysis information:
Example response:

Making fields required

To make sure that the key fields you defined are filled, you can mark them as required in your JSON schema.
Required Fields Highlight

Best practices

  1. Schema design:
    • Keep your schema as simple as possible while meeting your needs
    • Add descriptions to the fields to limit ambiguity
    • Use appropriate data types (string, number, boolean, etc.)
    • When in doubt, refer to the JSON documentation
  2. Query formulation:
    • Write your query so that its answer contains the information requested in the structuredOutputSchema — the system will use the query response to fill the output
    • Provide clear context in your query and use explicit instructions

Common use cases

  • Company classification and categorization
  • Competitive analysis
  • Market research
  • Product comparisons
  • Company performance assessments
Need help? Email support@linkup.so, ping us on Discord, or talk to us.