---
name: "Catmandu::Fix::search_sru"
section: "3pm"
platform: "linux"
package: "libcatmandu-sru-perl"
version: "0.43.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::search_sru"
---

# Catmandu::Fix::search\_sru(3pm)

use the value as SRU query, and replace it by SRU search result

## NAME

Catmandu::Fix::search\_sru - use the value as SRU query, and replace it by SRU search result

## SYNTAX

```
 search_sru( <path>, <url> )

 search_sru( <path>, <url>, [recordschema:<SCHEMA>], [parser:<PARSER>], [limit:<INTEGER>], [total:<INTEGER>], [fixes:<STRING|FILE>] )
 # From the command line
 $ echo '{"issn":"1940-5758"}' | catmandu convert JSON to YAML --fix 'search_sru(issn,"http://services.dnb.de/sru/zdb")'
 $ echo '{"issn":"dnb.iss = 1164-5563"}' | catmandu convert JSON to YAML --fix 'search_sru(issn, "http://services.dnb.de/sru/zdb", recordschema:MARC21-xml, parser:marcxml, fixes:"marc_map(245a,dc_title);remove_field(record)")'
```

## PARAMETERS

### path

The location in the perl hash where the query is stored.

See "PATHS" in Catmandu::Fix for more information about paths.

### url

Base URL of the SRU server.

### recordschema

SRU record schema. Use SRU Explain operation to look up available schema.

Default is 'oai\_dc'.

### parser

Controls how records are parsed before importing.

Available parsers: 'marcxml', 'meta', 'mods', 'picaxml', 'raw', 'simple', 'struct'.

Default is 'simple'.

### limit

Maximum number of records to fetch per request.

Default is 10.

### total

Maximum number of records to fetch from a result set.

### fixes

Catmandu::Fix to transform the parsed records of the SRU response.

## SEE ALSO

Catmandu::Fix

Catmandu::SRU

## AUTHOR

Johann Rolschewski `"<jorol at cpan.org>"`
